• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.browser;
18 
19 import android.app.Activity;
20 import android.content.Intent;
21 import android.view.Menu;
22 import android.view.MenuItem;
23 import android.webkit.WebView;
24 
25 import com.android.browser.UI.ComboViews;
26 
27 import java.util.List;
28 
29 
30 /**
31  * UI aspect of the controller
32  */
33 public interface UiController {
34 
getUi()35     UI getUi();
36 
getCurrentWebView()37     WebView getCurrentWebView();
38 
getCurrentTopWebView()39     WebView getCurrentTopWebView();
40 
getCurrentTab()41     Tab getCurrentTab();
42 
getTabControl()43     TabControl getTabControl();
44 
getTabs()45     List<Tab> getTabs();
46 
openTabToHomePage()47     Tab openTabToHomePage();
48 
openIncognitoTab()49     Tab openIncognitoTab();
50 
openTab(String url, boolean incognito, boolean setActive, boolean useCurrent)51     Tab openTab(String url, boolean incognito, boolean setActive,
52             boolean useCurrent);
53 
setActiveTab(Tab tab)54     void setActiveTab(Tab tab);
55 
switchToTab(Tab tab)56     boolean switchToTab(Tab tab);
57 
closeCurrentTab()58     void closeCurrentTab();
59 
closeTab(Tab tab)60     void closeTab(Tab tab);
61 
closeOtherTabs()62     void closeOtherTabs();
63 
stopLoading()64     void stopLoading();
65 
createBookmarkCurrentPageIntent(boolean canBeAnEdit)66     Intent createBookmarkCurrentPageIntent(boolean canBeAnEdit);
67 
bookmarksOrHistoryPicker(ComboViews startView)68     void bookmarksOrHistoryPicker(ComboViews startView);
69 
bookmarkCurrentPage()70     void bookmarkCurrentPage();
71 
editUrl()72     void editUrl();
73 
handleNewIntent(Intent intent)74     void handleNewIntent(Intent intent);
75 
shouldShowErrorConsole()76     boolean shouldShowErrorConsole();
77 
hideCustomView()78     void hideCustomView();
79 
attachSubWindow(Tab tab)80     void attachSubWindow(Tab tab);
81 
removeSubWindow(Tab tab)82     void removeSubWindow(Tab tab);
83 
isInCustomActionMode()84     boolean isInCustomActionMode();
85 
endActionMode()86     void endActionMode();
87 
shareCurrentPage()88     void shareCurrentPage();
89 
updateMenuState(Tab tab, Menu menu)90     void updateMenuState(Tab tab, Menu menu);
91 
onOptionsItemSelected(MenuItem item)92     boolean onOptionsItemSelected(MenuItem item);
93 
createNewSnapshotTab(long snapshotId, boolean setActive)94     SnapshotTab createNewSnapshotTab(long snapshotId, boolean setActive);
95 
loadUrl(Tab tab, String url)96     void loadUrl(Tab tab, String url);
97 
setBlockEvents(boolean block)98     void setBlockEvents(boolean block);
99 
getActivity()100     Activity getActivity();
101 
showPageInfo()102     void showPageInfo();
103 
openPreferences()104     void openPreferences();
105 
findOnPage()106     void findOnPage();
107 
toggleUserAgent()108     void toggleUserAgent();
109 
getSettings()110     BrowserSettings getSettings();
111 
supportsVoice()112     boolean supportsVoice();
113 
startVoiceRecognizer()114     void startVoiceRecognizer();
115 
116 }
117