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 com.android.browser.ScrollWebView.ScrollListener; |
| 20 | |
| 21 | import android.app.ActionBar; |
| 22 | import android.app.Activity; |
Michael Kolb | ac35bdc | 2011-01-17 17:06:04 -0800 | [diff] [blame] | 23 | import android.os.Bundle; |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 24 | import android.util.Log; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 25 | import android.view.ActionMode; |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 26 | import android.view.Gravity; |
Michael Kolb | a418306 | 2011-01-16 10:43:21 -0800 | [diff] [blame^] | 27 | import android.view.KeyEvent; |
John Reck | d73c5a2 | 2010-12-22 10:22:50 -0800 | [diff] [blame] | 28 | import android.view.View; |
| 29 | import android.webkit.WebChromeClient.CustomViewCallback; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 30 | import android.webkit.WebView; |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 31 | import android.widget.FrameLayout; |
| 32 | import android.widget.FrameLayout.LayoutParams; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 33 | |
| 34 | import java.util.List; |
| 35 | |
| 36 | /** |
| 37 | * Ui for xlarge screen sizes |
| 38 | */ |
| 39 | public class XLargeUi extends BaseUi implements ScrollListener { |
| 40 | |
| 41 | private static final String LOGTAG = "XLargeUi"; |
| 42 | |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 43 | private ActionBar mActionBar; |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 44 | private TabBar mTabBar; |
| 45 | |
| 46 | private TitleBarXLarge mTitleBar; |
| 47 | private TitleBarXLarge mFakeTitleBar; |
| 48 | |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 49 | private boolean mUseQuickControls; |
| 50 | private PieControl mPieControl; |
| 51 | |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 52 | /** |
| 53 | * @param browser |
| 54 | * @param controller |
| 55 | */ |
| 56 | public XLargeUi(Activity browser, UiController controller) { |
| 57 | super(browser, controller); |
| 58 | mTitleBar = new TitleBarXLarge(mActivity, mUiController, this); |
| 59 | mTitleBar.setProgress(100); |
Michael Kolb | cfa3af5 | 2010-12-14 10:36:11 -0800 | [diff] [blame] | 60 | mTitleBar.setEditable(false); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 61 | mFakeTitleBar = new TitleBarXLarge(mActivity, mUiController, this); |
Michael Kolb | cfa3af5 | 2010-12-14 10:36:11 -0800 | [diff] [blame] | 62 | mFakeTitleBar.setEditable(true); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 63 | mTabBar = new TabBar(mActivity, mUiController, this); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 64 | mActionBar = mActivity.getActionBar(); |
John Reck | b3417f0 | 2011-01-14 11:01:05 -0800 | [diff] [blame] | 65 | setupActionBar(); |
| 66 | setUseQuickControls(BrowserSettings.getInstance().useQuickControls()); |
| 67 | } |
| 68 | |
| 69 | private void setupActionBar() { |
| 70 | mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 71 | mActionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); |
| 72 | mActionBar.setCustomView(mTabBar); |
John Reck | b3417f0 | 2011-01-14 11:01:05 -0800 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | @Override |
Michael Kolb | ac35bdc | 2011-01-17 17:06:04 -0800 | [diff] [blame] | 76 | public void showComboView(boolean startWithHistory, Bundle extras) { |
| 77 | super.showComboView(startWithHistory, extras); |
| 78 | if (mUseQuickControls) { |
| 79 | mActionBar.show(); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | @Override |
John Reck | b3417f0 | 2011-01-14 11:01:05 -0800 | [diff] [blame] | 84 | public void hideComboView() { |
| 85 | super.hideComboView(); |
| 86 | // ComboView changes the action bar, set it back up to what we want |
| 87 | setupActionBar(); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | private void setUseQuickControls(boolean useQuickControls) { |
| 91 | mUseQuickControls = useQuickControls; |
| 92 | if (useQuickControls) { |
| 93 | checkTabCount(); |
| 94 | mPieControl = new PieControl(mActivity, mUiController, this); |
| 95 | mPieControl.attachToContainer(mContentView); |
| 96 | setFakeTitleBarGravity(Gravity.BOTTOM); |
| 97 | |
| 98 | // remove embedded title bar if present |
| 99 | WebView web = mTabControl.getCurrentWebView(); |
| 100 | if ((web != null) && (web.getVisibleTitleHeight() > 0)) { |
| 101 | web.setEmbeddedTitleBar(null); |
| 102 | } |
| 103 | } else { |
| 104 | mActivity.getActionBar().show(); |
| 105 | if (mPieControl != null) { |
| 106 | mPieControl.removeFromContainer(mContentView); |
| 107 | } |
| 108 | setFakeTitleBarGravity(Gravity.TOP); |
| 109 | // remove embedded title bar if present |
| 110 | WebView web = mTabControl.getCurrentWebView(); |
| 111 | if ((web != null) && (web.getVisibleTitleHeight() == 0)) { |
| 112 | web.setEmbeddedTitleBar(mTitleBar); |
| 113 | } |
| 114 | } |
| 115 | mTabBar.setUseQuickControls(mUseQuickControls); |
| 116 | mFakeTitleBar.setUseQuickControls(mUseQuickControls); |
| 117 | } |
| 118 | |
| 119 | private void checkTabCount() { |
| 120 | if (mUseQuickControls) { |
| 121 | int n = mTabBar.getTabCount(); |
| 122 | if (n >= 2) { |
| 123 | mActivity.getActionBar().show(); |
| 124 | } else if (n == 1) { |
| 125 | mActivity.getActionBar().hide(); |
| 126 | } |
| 127 | } |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | @Override |
| 131 | public void onDestroy() { |
| 132 | hideFakeTitleBar(); |
| 133 | } |
| 134 | |
| 135 | // webview factory |
| 136 | |
| 137 | @Override |
| 138 | public WebView createWebView(boolean privateBrowsing) { |
| 139 | // Create a new WebView |
| 140 | ScrollWebView w = new ScrollWebView(mActivity, null, |
| 141 | android.R.attr.webViewStyle, privateBrowsing); |
| 142 | initWebViewSettings(w); |
| 143 | w.setScrollListener(this); |
| 144 | w.getSettings().setDisplayZoomControls(false); |
| 145 | return w; |
| 146 | } |
| 147 | |
| 148 | @Override |
| 149 | public WebView createSubWebView(boolean privateBrowsing) { |
| 150 | ScrollWebView web = (ScrollWebView) createWebView(privateBrowsing); |
| 151 | // no scroll listener for subview |
| 152 | web.setScrollListener(null); |
| 153 | return web; |
| 154 | } |
| 155 | |
| 156 | @Override |
| 157 | public void onScroll(int visibleTitleHeight) { |
| 158 | mTabBar.onScroll(visibleTitleHeight); |
| 159 | } |
| 160 | |
| 161 | void stopWebViewScrolling() { |
| 162 | ScrollWebView web = (ScrollWebView) mUiController.getCurrentWebView(); |
| 163 | if (web != null) { |
| 164 | web.stopScroll(); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | // WebView callbacks |
| 169 | |
| 170 | @Override |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 171 | public void bookmarkedStatusHasChanged(Tab tab) { |
| 172 | if (tab.inForeground()) { |
| 173 | boolean isBookmark = tab.isBookmarkedSite(); |
| 174 | mTitleBar.setCurrentUrlIsBookmark(isBookmark); |
| 175 | mFakeTitleBar.setCurrentUrlIsBookmark(isBookmark); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | @Override |
John Reck | 30c714c | 2010-12-16 17:30:34 -0800 | [diff] [blame] | 180 | public void onProgressChanged(Tab tab) { |
| 181 | int progress = tab.getLoadProgress(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 182 | mTabBar.onProgress(tab, progress); |
| 183 | if (tab.inForeground()) { |
| 184 | mFakeTitleBar.setProgress(progress); |
| 185 | if (progress == 100) { |
Michael Kolb | bd018d4 | 2010-12-15 15:43:39 -0800 | [diff] [blame] | 186 | if (!mFakeTitleBar.isEditingUrl()) { |
| 187 | hideFakeTitleBar(); |
| 188 | if (mUseQuickControls) { |
| 189 | mFakeTitleBar.setShowProgressOnly(false); |
| 190 | setFakeTitleBarGravity(Gravity.BOTTOM); |
| 191 | } |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 192 | } |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 193 | } else { |
Michael Kolb | bd018d4 | 2010-12-15 15:43:39 -0800 | [diff] [blame] | 194 | if (mUseQuickControls && !mFakeTitleBar.isEditingUrl()) { |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 195 | mFakeTitleBar.setShowProgressOnly(true); |
| 196 | if (!isFakeTitleBarShowing()) { |
| 197 | setFakeTitleBarGravity(Gravity.TOP); |
| 198 | } |
| 199 | } |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 200 | showFakeTitleBar(); |
| 201 | } |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | @Override |
| 206 | public boolean needsRestoreAllTabs() { |
| 207 | return true; |
| 208 | } |
| 209 | |
| 210 | @Override |
| 211 | public void addTab(Tab tab) { |
| 212 | mTabBar.onNewTab(tab); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 213 | checkTabCount(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | @Override |
| 217 | public void setActiveTab(Tab tab) { |
| 218 | super.setActiveTab(tab); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 219 | ScrollWebView view = (ScrollWebView) tab.getWebView(); |
| 220 | // TabControl.setCurrentTab has been called before this, |
| 221 | // so the tab is guaranteed to have a webview |
| 222 | if (view == null) { |
| 223 | Log.e(LOGTAG, "active tab with no webview detected"); |
| 224 | return; |
| 225 | } |
| 226 | // Request focus on the top window. |
| 227 | if (mUseQuickControls) { |
| 228 | mPieControl.forceToTop(mContentView); |
| 229 | view.setScrollListener(null); |
| 230 | mTabBar.showTitleBarIndicator(false); |
| 231 | } else { |
| 232 | view.setEmbeddedTitleBar(mTitleBar); |
| 233 | view.setScrollListener(this); |
| 234 | } |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 235 | mTabBar.onSetActiveTab(tab); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 236 | if (tab.isInVoiceSearchMode()) { |
| 237 | showVoiceTitleBar(tab.getVoiceDisplayTitle()); |
| 238 | } else { |
| 239 | revertVoiceTitleBar(tab); |
| 240 | } |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 241 | updateLockIconToLatest(tab); |
| 242 | tab.getTopWindow().requestFocus(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | @Override |
| 246 | public void updateTabs(List<Tab> tabs) { |
| 247 | mTabBar.updateTabs(tabs); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 248 | checkTabCount(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 249 | } |
| 250 | |
| 251 | @Override |
| 252 | public void removeTab(Tab tab) { |
| 253 | super.removeTab(tab); |
| 254 | mTabBar.onRemoveTab(tab); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 255 | checkTabCount(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 256 | } |
| 257 | |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 258 | int getContentWidth() { |
| 259 | if (mContentView != null) { |
| 260 | return mContentView.getWidth(); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 261 | } |
| 262 | return 0; |
| 263 | } |
| 264 | |
| 265 | void editUrl(boolean clearInput) { |
Michael Kolb | d72ea3b | 2011-01-09 15:56:37 -0800 | [diff] [blame] | 266 | if (mUiController.isInCustomActionMode()) { |
| 267 | mUiController.endActionMode(); |
| 268 | } |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 269 | showFakeTitleBar(); |
| 270 | mFakeTitleBar.onEditUrl(clearInput); |
| 271 | } |
| 272 | |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 273 | void setFakeTitleBarGravity(int gravity) { |
| 274 | FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) |
| 275 | mFakeTitleBar.getLayoutParams(); |
| 276 | if (lp == null) { |
| 277 | lp = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, |
| 278 | LayoutParams.WRAP_CONTENT); |
| 279 | } |
| 280 | lp.gravity = gravity; |
| 281 | mFakeTitleBar.setLayoutParams(lp); |
| 282 | } |
| 283 | |
| 284 | void showFakeTitleBarAndEdit() { |
Michael Kolb | bd018d4 | 2010-12-15 15:43:39 -0800 | [diff] [blame] | 285 | mFakeTitleBar.setShowProgressOnly(false); |
| 286 | setFakeTitleBarGravity(Gravity.BOTTOM); |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 287 | showFakeTitleBar(); |
| 288 | mFakeTitleBar.onEditUrl(false); |
| 289 | } |
| 290 | |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 291 | @Override |
| 292 | protected void attachFakeTitleBar(WebView mainView) { |
| 293 | mContentView.addView(mFakeTitleBar); |
| 294 | mTabBar.onShowTitleBar(); |
| 295 | } |
| 296 | |
| 297 | @Override |
| 298 | protected void hideFakeTitleBar() { |
| 299 | if (isFakeTitleBarShowing()) { |
Michael Kolb | 467af0a | 2011-01-11 13:09:49 -0800 | [diff] [blame] | 300 | mFakeTitleBar.setUrlMode(false); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 301 | mContentView.removeView(mFakeTitleBar); |
| 302 | mTabBar.onHideTitleBar(); |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | @Override |
| 307 | protected boolean isFakeTitleBarShowing() { |
| 308 | return (mFakeTitleBar.getParent() != null); |
| 309 | } |
| 310 | |
| 311 | @Override |
| 312 | protected TitleBarBase getFakeTitleBar() { |
| 313 | return mFakeTitleBar; |
| 314 | } |
| 315 | |
| 316 | @Override |
| 317 | protected TitleBarBase getEmbeddedTitleBar() { |
| 318 | return mTitleBar; |
| 319 | } |
| 320 | |
| 321 | // action mode callbacks |
| 322 | |
| 323 | @Override |
| 324 | public void onActionModeStarted(ActionMode mode) { |
Michael Kolb | bd018d4 | 2010-12-15 15:43:39 -0800 | [diff] [blame] | 325 | if (!mFakeTitleBar.isEditingUrl()) { |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 326 | // hide the fake title bar when CAB is shown |
| 327 | hideFakeTitleBar(); |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | @Override |
Michael Kolb | 376b541 | 2010-12-15 11:52:57 -0800 | [diff] [blame] | 332 | public void onActionModeFinished(boolean inLoad) { |
| 333 | checkTabCount(); |
| 334 | if (inLoad) { |
| 335 | // the titlebar was removed when the CAB was shown |
| 336 | // if the page is loading, show it again |
| 337 | mFakeTitleBar.setShowProgressOnly(true); |
| 338 | if (!isFakeTitleBarShowing()) { |
| 339 | setFakeTitleBarGravity(Gravity.TOP); |
| 340 | } |
| 341 | showFakeTitleBar(); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | @Override |
Michael Kolb | 5a72f18 | 2011-01-13 20:35:06 -0800 | [diff] [blame] | 346 | protected void updateNavigationState(Tab tab) { |
| 347 | mTitleBar.updateNavigationState(tab); |
| 348 | mFakeTitleBar.updateNavigationState(tab); |
| 349 | } |
| 350 | |
| 351 | @Override |
John Reck | 30c714c | 2010-12-16 17:30:34 -0800 | [diff] [blame] | 352 | public void setUrlTitle(Tab tab) { |
| 353 | super.setUrlTitle(tab); |
| 354 | mTabBar.onUrlAndTitle(tab, tab.getUrl(), tab.getTitle()); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 355 | } |
| 356 | |
| 357 | // Set the favicon in the title bar. |
| 358 | @Override |
John Reck | 30c714c | 2010-12-16 17:30:34 -0800 | [diff] [blame] | 359 | public void setFavicon(Tab tab) { |
| 360 | super.setFavicon(tab); |
| 361 | mTabBar.onFavicon(tab, tab.getFavicon()); |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 362 | } |
| 363 | |
Michael Kolb | cfa3af5 | 2010-12-14 10:36:11 -0800 | [diff] [blame] | 364 | @Override |
| 365 | public void showVoiceTitleBar(String title) { |
| 366 | List<String> vsresults = null; |
| 367 | if (getActiveTab() != null) { |
| 368 | vsresults = getActiveTab().getVoiceSearchResults(); |
| 369 | } |
| 370 | mTitleBar.setInVoiceMode(true, null); |
| 371 | mTitleBar.setDisplayTitle(title); |
| 372 | mFakeTitleBar.setInVoiceMode(true, vsresults); |
| 373 | mFakeTitleBar.setDisplayTitle(title); |
| 374 | } |
| 375 | |
| 376 | @Override |
| 377 | public void revertVoiceTitleBar(Tab tab) { |
| 378 | mTitleBar.setInVoiceMode(false, null); |
John Reck | 30c714c | 2010-12-16 17:30:34 -0800 | [diff] [blame] | 379 | String url = tab.getUrl(); |
Michael Kolb | cfa3af5 | 2010-12-14 10:36:11 -0800 | [diff] [blame] | 380 | mTitleBar.setDisplayTitle(url); |
| 381 | mFakeTitleBar.setInVoiceMode(false, null); |
| 382 | mFakeTitleBar.setDisplayTitle(url); |
| 383 | } |
| 384 | |
John Reck | d73c5a2 | 2010-12-22 10:22:50 -0800 | [diff] [blame] | 385 | @Override |
| 386 | public void showCustomView(View view, CustomViewCallback callback) { |
| 387 | super.showCustomView(view, callback); |
| 388 | mActivity.getActionBar().hide(); |
| 389 | } |
Michael Kolb | cfa3af5 | 2010-12-14 10:36:11 -0800 | [diff] [blame] | 390 | |
John Reck | d73c5a2 | 2010-12-22 10:22:50 -0800 | [diff] [blame] | 391 | @Override |
| 392 | public void onHideCustomView() { |
| 393 | super.onHideCustomView(); |
| 394 | if (mUseQuickControls) { |
| 395 | checkTabCount(); |
| 396 | } else { |
| 397 | mActivity.getActionBar().show(); |
| 398 | } |
| 399 | } |
Michael Kolb | a418306 | 2011-01-16 10:43:21 -0800 | [diff] [blame^] | 400 | |
| 401 | @Override |
| 402 | public boolean dispatchKey(int code, KeyEvent event) { |
| 403 | WebView web = getActiveTab().getWebView(); |
| 404 | switch (code) { |
| 405 | case KeyEvent.KEYCODE_TAB: |
| 406 | case KeyEvent.KEYCODE_DPAD_UP: |
| 407 | case KeyEvent.KEYCODE_DPAD_LEFT: |
| 408 | if ((web != null) && web.hasFocus()) { |
| 409 | editUrl(true); |
| 410 | return true; |
| 411 | } |
| 412 | } |
| 413 | if (event.isPrintingKey() && !mFakeTitleBar.isEditingUrl()) { |
| 414 | editUrl(true); |
| 415 | return mContentView.dispatchKeyEvent(event); |
| 416 | } |
| 417 | return false; |
| 418 | } |
| 419 | |
Michael Kolb | 6670653 | 2010-12-12 19:50:22 -0800 | [diff] [blame] | 420 | } |