Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 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.content.Intent; |
| 20 | import android.webkit.WebView; |
| 21 | |
Michael Kolb | 1bf2313 | 2010-11-19 12:55:12 -0800 | [diff] [blame] | 22 | import java.util.List; |
| 23 | |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * UI aspect of the controller |
| 27 | */ |
| 28 | public interface UiController extends BookmarksHistoryCallbacks { |
| 29 | |
| 30 | UI getUi(); |
| 31 | |
| 32 | WebView getCurrentWebView(); |
| 33 | |
| 34 | WebView getCurrentTopWebView(); |
| 35 | |
| 36 | TabControl getTabControl(); |
| 37 | |
Michael Kolb | 1bf2313 | 2010-11-19 12:55:12 -0800 | [diff] [blame] | 38 | List<Tab> getTabs(); |
| 39 | |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 40 | 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 | |
Michael Kolb | ba99c5d | 2010-11-29 14:57:41 -0800 | [diff] [blame^] | 78 | void shareCurrentPage(); |
| 79 | |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 80 | } |