blob: dffebbae57b424183147235ed54650d0615f8cfd [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
52 void bookmarkCurrentPage(long folderId);
53
54 void bookmarksOrHistoryPicker(boolean openHistory);
55
56 void showVoiceSearchResults(String title);
57
58 void editUrl();
59
60 void removeActiveTabsPage(boolean attach);
61
62 void handleNewIntent(Intent intent);
63
64 boolean shouldShowErrorConsole();
65
66 void removeComboView();
67
68 void hideCustomView();
69
70 void attachSubWindow(Tab tab);
71
72 void removeSubWindow(Tab tab);
73
74 boolean isInCustomActionMode();
75
76 void endActionMode();
77
78}