blob: a16b44b78c357c41111611e6aaba357e260e56f4 [file] [log] [blame]
Michael Kolb8233fac2010-10-26 16:08:53 -07001/*
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
17package com.android.browser;
18
19import android.content.Intent;
20import android.webkit.WebView;
21
Michael Kolb1bf23132010-11-19 12:55:12 -080022import java.util.List;
23
Michael Kolb8233fac2010-10-26 16:08:53 -070024
25/**
26 * UI aspect of the controller
27 */
28public interface UiController extends BookmarksHistoryCallbacks {
29
30 UI getUi();
31
32 WebView getCurrentWebView();
33
34 WebView getCurrentTopWebView();
35
36 TabControl getTabControl();
37
Michael Kolb1bf23132010-11-19 12:55:12 -080038 List<Tab> getTabs();
39
Michael Kolb8233fac2010-10-26 16:08:53 -070040 Tab openTabToHomePage();
41
42 Tab openIncognitoTab();
43
44 boolean switchToTab(int tabIndex);
45
46 void closeCurrentTab();
47
48 void closeTab(Tab tab);
49
50 void stopLoading();
51
Leon Scrogginsbdff8a72011-02-11 15:49:04 -050052 void bookmarkCurrentPage(long folderId, boolean canBeAnEdit);
Michael Kolb8233fac2010-10-26 16:08:53 -070053
54 void bookmarksOrHistoryPicker(boolean openHistory);
55
Michael Kolbcfa3af52010-12-14 10:36:11 -080056 void startVoiceSearch();
57
Michael Kolb8233fac2010-10-26 16:08:53 -070058 void showVoiceSearchResults(String title);
59
60 void editUrl();
61
62 void removeActiveTabsPage(boolean attach);
63
64 void handleNewIntent(Intent intent);
65
66 boolean shouldShowErrorConsole();
67
68 void removeComboView();
69
70 void hideCustomView();
71
72 void attachSubWindow(Tab tab);
73
74 void removeSubWindow(Tab tab);
75
76 boolean isInCustomActionMode();
77
78 void endActionMode();
79
Michael Kolbba99c5d2010-11-29 14:57:41 -080080 void shareCurrentPage();
81
John Reckb3417f02011-01-14 11:01:05 -080082 void registerOptionsMenuHandler(OptionsMenuHandler handler);
83
84 void unregisterOptionsMenuHandler(OptionsMenuHandler handler);
Michael Kolb8233fac2010-10-26 16:08:53 -070085}