Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [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.app.Activity; |
Michael Kolb | 30adae6 | 2011-07-29 13:37:05 -0700 | [diff] [blame] | 20 | import android.content.Context; |
Michael Kolb | 4bd767d | 2011-05-27 11:33:55 -0700 | [diff] [blame] | 21 | import android.os.Bundle; |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 22 | import android.util.Log; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 23 | import android.view.ActionMode; |
| 24 | import android.view.Gravity; |
Michael Kolb | a418306 | 2011-01-16 10:43:21 -0800 | [diff] [blame] | 25 | import android.view.KeyEvent; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 26 | import android.view.Menu; |
Michael Kolb | 3ca1275 | 2011-07-20 13:52:25 -0700 | [diff] [blame] | 27 | import android.view.MenuItem; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 28 | import android.view.View; |
Michael Kolb | 30adae6 | 2011-07-29 13:37:05 -0700 | [diff] [blame] | 29 | import android.view.accessibility.AccessibilityEvent; |
| 30 | import android.view.accessibility.AccessibilityManager; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 31 | import android.webkit.WebView; |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 32 | import android.widget.FrameLayout; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 33 | |
Michael Kolb | 629b22c | 2011-07-13 16:26:47 -0700 | [diff] [blame] | 34 | import com.android.browser.UrlInputView.StateListener; |
| 35 | |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 36 | /** |
| 37 | * Ui for regular phone screen sizes |
| 38 | */ |
| 39 | public class PhoneUi extends BaseUi { |
| 40 | |
| 41 | private static final String LOGTAG = "PhoneUi"; |
| 42 | |
Michael Kolb | 0241e75 | 2011-07-07 14:58:50 -0700 | [diff] [blame] | 43 | private PieControlPhone mPieControl; |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 44 | private NavScreen mNavScreen; |
John Reck | 0f602f3 | 2011-07-07 15:38:43 -0700 | [diff] [blame] | 45 | private NavigationBarPhone mNavigationBar; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 46 | |
| 47 | boolean mExtendedMenuOpen; |
| 48 | boolean mOptionsMenuOpen; |
Michael Kolb | 08a687a | 2011-04-22 16:13:02 -0700 | [diff] [blame] | 49 | boolean mAnimating; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 50 | |
| 51 | /** |
| 52 | * @param browser |
| 53 | * @param controller |
| 54 | */ |
| 55 | public PhoneUi(Activity browser, UiController controller) { |
| 56 | super(browser, controller); |
John Reck | 285ef04 | 2011-02-11 15:44:17 -0800 | [diff] [blame] | 57 | mActivity.getActionBar().hide(); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 58 | setUseQuickControls(BrowserSettings.getInstance().useQuickControls()); |
John Reck | 0f602f3 | 2011-07-07 15:38:43 -0700 | [diff] [blame] | 59 | mNavigationBar = (NavigationBarPhone) mTitleBar.getNavigationBar(); |
John Reck | 285ef04 | 2011-02-11 15:44:17 -0800 | [diff] [blame] | 60 | } |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 61 | |
John Reck | 285ef04 | 2011-02-11 15:44:17 -0800 | [diff] [blame] | 62 | @Override |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 63 | public void onDestroy() { |
Michael Kolb | 7cdc490 | 2011-02-03 17:54:40 -0800 | [diff] [blame] | 64 | hideTitleBar(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | @Override |
Michael Kolb | dc2ee1b | 2011-02-14 14:34:40 -0800 | [diff] [blame] | 68 | public void editUrl(boolean clearInput) { |
Michael Kolb | 46f987e | 2011-04-05 10:39:10 -0700 | [diff] [blame] | 69 | if (mUseQuickControls) { |
John Reck | 0f602f3 | 2011-07-07 15:38:43 -0700 | [diff] [blame] | 70 | mTitleBar.setShowProgressOnly(false); |
Michael Kolb | 46f987e | 2011-04-05 10:39:10 -0700 | [diff] [blame] | 71 | } |
| 72 | super.editUrl(clearInput); |
Michael Kolb | dc2ee1b | 2011-02-14 14:34:40 -0800 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | @Override |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 76 | public boolean onBackKey() { |
Michael Kolb | 9ef259a | 2011-07-12 15:33:08 -0700 | [diff] [blame] | 77 | if (mNavScreen != null) { |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 78 | mNavScreen.close(); |
| 79 | return true; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 80 | } |
| 81 | return super.onBackKey(); |
| 82 | } |
| 83 | |
| 84 | @Override |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 85 | public boolean dispatchKey(int code, KeyEvent event) { |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 86 | return false; |
| 87 | } |
| 88 | |
| 89 | @Override |
John Reck | 30c714c | 2010-12-16 17:30:34 -0800 | [diff] [blame] | 90 | public void onProgressChanged(Tab tab) { |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 91 | if (tab.inForeground()) { |
John Reck | 30c714c | 2010-12-16 17:30:34 -0800 | [diff] [blame] | 92 | int progress = tab.getLoadProgress(); |
Michael Kolb | 7cdc490 | 2011-02-03 17:54:40 -0800 | [diff] [blame] | 93 | mTitleBar.setProgress(progress); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 94 | if (progress == 100) { |
| 95 | if (!mOptionsMenuOpen || !mExtendedMenuOpen) { |
John Reck | 5d43ce8 | 2011-06-21 17:16:51 -0700 | [diff] [blame] | 96 | suggestHideTitleBar(); |
Michael Kolb | c16c595 | 2011-03-29 15:37:03 -0700 | [diff] [blame] | 97 | if (mUseQuickControls) { |
| 98 | mTitleBar.setShowProgressOnly(false); |
| 99 | } |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 100 | } |
| 101 | } else { |
| 102 | if (!mOptionsMenuOpen || mExtendedMenuOpen) { |
Michael Kolb | c16c595 | 2011-03-29 15:37:03 -0700 | [diff] [blame] | 103 | if (mUseQuickControls && !mTitleBar.isEditingUrl()) { |
| 104 | mTitleBar.setShowProgressOnly(true); |
| 105 | setTitleGravity(Gravity.TOP); |
| 106 | } |
Michael Kolb | 7cdc490 | 2011-02-03 17:54:40 -0800 | [diff] [blame] | 107 | showTitleBar(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 108 | } |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | @Override |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 114 | public void setActiveTab(final Tab tab) { |
John Reck | 5d43ce8 | 2011-06-21 17:16:51 -0700 | [diff] [blame] | 115 | super.setActiveTab(tab); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 116 | BrowserWebView view = (BrowserWebView) tab.getWebView(); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 117 | // TabControl.setCurrentTab has been called before this, |
| 118 | // so the tab is guaranteed to have a webview |
| 119 | if (view == null) { |
| 120 | Log.e(LOGTAG, "active tab with no webview detected"); |
| 121 | return; |
| 122 | } |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 123 | // Request focus on the top window. |
| 124 | if (mUseQuickControls) { |
| 125 | mPieControl.forceToTop(mContentView); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 126 | } else { |
| 127 | // check if title bar is already attached by animation |
| 128 | if (mTitleBar.getParent() == null) { |
| 129 | view.setEmbeddedTitleBar(mTitleBar); |
| 130 | } |
| 131 | } |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 132 | if (tab.isInVoiceSearchMode()) { |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 133 | showVoiceTitleBar(tab.getVoiceDisplayTitle(), tab.getVoiceSearchResults()); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 134 | } else { |
| 135 | revertVoiceTitleBar(tab); |
| 136 | } |
Michael Kolb | 629b22c | 2011-07-13 16:26:47 -0700 | [diff] [blame] | 137 | // update nav bar state |
| 138 | mNavigationBar.onStateChanged(StateListener.STATE_NORMAL); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 139 | updateLockIconToLatest(tab); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 140 | tab.getTopWindow().requestFocus(); |
| 141 | } |
| 142 | |
Michael Kolb | 017ffab | 2011-07-11 15:26:47 -0700 | [diff] [blame] | 143 | /** |
| 144 | * Suggest to the UI that the title bar can be hidden. The UI will then |
| 145 | * decide whether or not to hide based off a number of factors, such |
| 146 | * as if the user is editing the URL bar or if the page is loading |
| 147 | */ |
| 148 | @Override |
| 149 | public void suggestHideTitleBar() { |
John Reck | 0f602f3 | 2011-07-07 15:38:43 -0700 | [diff] [blame] | 150 | if (!mNavigationBar.isMenuShowing()) { |
| 151 | super.suggestHideTitleBar(); |
Michael Kolb | 017ffab | 2011-07-11 15:26:47 -0700 | [diff] [blame] | 152 | } |
| 153 | } |
| 154 | |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 155 | @Override |
John Reck | 2bc8042 | 2011-06-30 15:11:49 -0700 | [diff] [blame] | 156 | public void showComboView(ComboViews startWith, Bundle extras) { |
Michael Kolb | 4bd767d | 2011-05-27 11:33:55 -0700 | [diff] [blame] | 157 | if (mNavScreen != null) { |
| 158 | hideNavScreen(false); |
| 159 | } |
John Reck | 2bc8042 | 2011-06-30 15:11:49 -0700 | [diff] [blame] | 160 | super.showComboView(startWith, extras); |
Michael Kolb | 4bd767d | 2011-05-27 11:33:55 -0700 | [diff] [blame] | 161 | } |
| 162 | |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 163 | // menu handling callbacks |
| 164 | |
| 165 | @Override |
Michael Kolb | 3ca1275 | 2011-07-20 13:52:25 -0700 | [diff] [blame] | 166 | public boolean onPrepareOptionsMenu(Menu menu) { |
Michael Kolb | 7bdee0b | 2011-08-01 11:55:38 -0700 | [diff] [blame^] | 167 | updateMenuState(mActiveTab, menu); |
Michael Kolb | 3ca1275 | 2011-07-20 13:52:25 -0700 | [diff] [blame] | 168 | return true; |
| 169 | } |
| 170 | |
| 171 | @Override |
Michael Kolb | 7bdee0b | 2011-08-01 11:55:38 -0700 | [diff] [blame^] | 172 | public void updateMenuState(Tab tab, Menu menu) { |
| 173 | menu.setGroupVisible(R.id.NAV_MENU, (mNavScreen == null)); |
| 174 | MenuItem bm = menu.findItem(R.id.bookmarks_menu_id); |
| 175 | if (bm != null) { |
| 176 | bm.setVisible(mNavScreen == null); |
| 177 | } |
| 178 | MenuItem nt = menu.findItem(R.id.new_tab_menu_id); |
| 179 | if (nt != null) { |
| 180 | nt.setVisible(mNavScreen == null); |
| 181 | } |
| 182 | MenuItem find = menu.findItem(R.id.find_menu_id); |
| 183 | if (find != null) { |
| 184 | find.setVisible(((tab != null) && !tab.isSnapshot())); |
| 185 | } |
| 186 | MenuItem abm = menu.findItem(R.id.add_bookmark_menu_id); |
| 187 | if (abm != null) { |
| 188 | abm.setVisible((tab != null) && !tab.isSnapshot()); |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | @Override |
Michael Kolb | 3ca1275 | 2011-07-20 13:52:25 -0700 | [diff] [blame] | 193 | public boolean onOptionsItemSelected(MenuItem item) { |
| 194 | if (mNavScreen != null) { |
| 195 | hideNavScreen(false); |
| 196 | } |
| 197 | return false; |
| 198 | } |
| 199 | |
| 200 | @Override |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 201 | public void onContextMenuCreated(Menu menu) { |
Michael Kolb | 7cdc490 | 2011-02-03 17:54:40 -0800 | [diff] [blame] | 202 | hideTitleBar(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 203 | } |
| 204 | |
| 205 | @Override |
| 206 | public void onContextMenuClosed(Menu menu, boolean inLoad) { |
| 207 | if (inLoad) { |
Michael Kolb | 7cdc490 | 2011-02-03 17:54:40 -0800 | [diff] [blame] | 208 | showTitleBar(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 209 | } |
| 210 | } |
| 211 | |
| 212 | // action mode callbacks |
| 213 | |
| 214 | @Override |
| 215 | public void onActionModeStarted(ActionMode mode) { |
Michael Kolb | 7cdc490 | 2011-02-03 17:54:40 -0800 | [diff] [blame] | 216 | hideTitleBar(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 217 | } |
| 218 | |
Michael Kolb | a418306 | 2011-01-16 10:43:21 -0800 | [diff] [blame] | 219 | @Override |
John Reck | 6cda7b1 | 2011-03-18 15:57:13 -0700 | [diff] [blame] | 220 | public void onActionModeFinished(boolean inLoad) { |
Michael Kolb | c16c595 | 2011-03-29 15:37:03 -0700 | [diff] [blame] | 221 | if (inLoad) { |
| 222 | if (mUseQuickControls) { |
| 223 | mTitleBar.setShowProgressOnly(true); |
John Reck | 6cda7b1 | 2011-03-18 15:57:13 -0700 | [diff] [blame] | 224 | } |
Michael Kolb | c16c595 | 2011-03-29 15:37:03 -0700 | [diff] [blame] | 225 | showTitleBar(); |
| 226 | } |
| 227 | mActivity.getActionBar().hide(); |
John Reck | 6cda7b1 | 2011-03-18 15:57:13 -0700 | [diff] [blame] | 228 | } |
| 229 | |
| 230 | @Override |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 231 | protected void setTitleGravity(int gravity) { |
| 232 | if (mUseQuickControls) { |
| 233 | FrameLayout.LayoutParams lp = |
John Reck | 0f602f3 | 2011-07-07 15:38:43 -0700 | [diff] [blame] | 234 | (FrameLayout.LayoutParams) mTitleBar.getLayoutParams(); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 235 | lp.gravity = gravity; |
John Reck | 0f602f3 | 2011-07-07 15:38:43 -0700 | [diff] [blame] | 236 | mTitleBar.setLayoutParams(lp); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 237 | } else { |
| 238 | super.setTitleGravity(gravity); |
| 239 | } |
| 240 | } |
| 241 | |
Michael Kolb | 0241e75 | 2011-07-07 14:58:50 -0700 | [diff] [blame] | 242 | @Override |
| 243 | public void setUseQuickControls(boolean useQuickControls) { |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 244 | mUseQuickControls = useQuickControls; |
John Reck | 0f602f3 | 2011-07-07 15:38:43 -0700 | [diff] [blame] | 245 | mTitleBar.setUseQuickControls(mUseQuickControls); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 246 | if (useQuickControls) { |
Michael Kolb | 0241e75 | 2011-07-07 14:58:50 -0700 | [diff] [blame] | 247 | mPieControl = new PieControlPhone(mActivity, mUiController, this); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 248 | mPieControl.attachToContainer(mContentView); |
Michael Kolb | 46f987e | 2011-04-05 10:39:10 -0700 | [diff] [blame] | 249 | WebView web = getWebView(); |
| 250 | if (web != null) { |
| 251 | web.setEmbeddedTitleBar(null); |
Michael Kolb | 0241e75 | 2011-07-07 14:58:50 -0700 | [diff] [blame] | 252 | // don't show url bar on scrolling |
| 253 | web.setOnTouchListener(null); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 254 | } |
| 255 | } else { |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 256 | if (mPieControl != null) { |
| 257 | mPieControl.removeFromContainer(mContentView); |
| 258 | } |
Michael Kolb | 46f987e | 2011-04-05 10:39:10 -0700 | [diff] [blame] | 259 | WebView web = getWebView(); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 260 | if (web != null) { |
| 261 | web.setEmbeddedTitleBar(mTitleBar); |
Michael Kolb | 0241e75 | 2011-07-07 14:58:50 -0700 | [diff] [blame] | 262 | // show url bar on scrolling |
| 263 | web.setOnTouchListener(this); |
Michael Kolb | fdb7024 | 2011-03-24 09:41:11 -0700 | [diff] [blame] | 264 | } |
| 265 | setTitleGravity(Gravity.NO_GRAVITY); |
| 266 | } |
| 267 | } |
| 268 | |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 269 | void showNavScreen() { |
Michael Kolb | 2814a36 | 2011-05-19 15:49:41 -0700 | [diff] [blame] | 270 | detachTab(mActiveTab); |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 271 | mNavScreen = new NavScreen(mActivity, mUiController, this); |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 272 | // Add the custom view to its container. |
Michael Kolb | 2814a36 | 2011-05-19 15:49:41 -0700 | [diff] [blame] | 273 | mCustomViewContainer.addView(mNavScreen, COVER_SCREEN_PARAMS); |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 274 | mContentView.setVisibility(View.GONE); |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 275 | mCustomViewContainer.setVisibility(View.VISIBLE); |
| 276 | mCustomViewContainer.bringToFront(); |
Michael Kolb | 30adae6 | 2011-07-29 13:37:05 -0700 | [diff] [blame] | 277 | // notify accessibility manager about the screen change |
| 278 | mNavScreen.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 279 | } |
| 280 | |
Michael Kolb | 2814a36 | 2011-05-19 15:49:41 -0700 | [diff] [blame] | 281 | void hideNavScreen(boolean animate) { |
Michael Kolb | 09bf24f | 2011-06-09 14:34:30 -0700 | [diff] [blame] | 282 | if (mNavScreen == null) return; |
Michael Kolb | 2814a36 | 2011-05-19 15:49:41 -0700 | [diff] [blame] | 283 | Tab tab = mNavScreen.getSelectedTab(); |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 284 | mCustomViewContainer.removeView(mNavScreen); |
| 285 | mNavScreen = null; |
| 286 | mCustomViewContainer.setVisibility(View.GONE); |
Michael Kolb | 2814a36 | 2011-05-19 15:49:41 -0700 | [diff] [blame] | 287 | mUiController.setActiveTab(tab); |
Michael Kolb | f205560 | 2011-04-09 17:20:03 -0700 | [diff] [blame] | 288 | // Show the content view. |
| 289 | mContentView.setVisibility(View.VISIBLE); |
| 290 | } |
| 291 | |
John Reck | 6b4bd5f | 2011-07-12 10:14:38 -0700 | [diff] [blame] | 292 | @Override |
| 293 | public boolean needsRestoreAllTabs() { |
| 294 | return false; |
| 295 | } |
| 296 | |
Michael Kolb | 20be26d | 2011-07-18 16:38:02 -0700 | [diff] [blame] | 297 | public void toggleNavScreen() { |
| 298 | if (mNavScreen == null) { |
| 299 | showNavScreen(); |
| 300 | } else { |
| 301 | hideNavScreen(false); |
| 302 | } |
| 303 | } |
| 304 | |
John Reck | 1cf4b79 | 2011-07-26 10:22:22 -0700 | [diff] [blame] | 305 | @Override |
| 306 | public boolean shouldCaptureThumbnails() { |
| 307 | return true; |
| 308 | } |
| 309 | |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 310 | } |