Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(835)

Side by Side Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java

Issue 552373004: Dismissing suggestion popup if options menu is invoked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.shell; 5 package org.chromium.chrome.shell;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 public void createTab(String url) { 274 public void createTab(String url) {
275 mTabManager.createTab(url); 275 mTabManager.createTab(url);
276 } 276 }
277 277
278 /** 278 /**
279 * Override the menu key event to show AppMenu. 279 * Override the menu key event to show AppMenu.
280 */ 280 */
281 @Override 281 @Override
282 public boolean onKeyDown(int keyCode, KeyEvent event) { 282 public boolean onKeyDown(int keyCode, KeyEvent event) {
283 if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0) { 283 if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0) {
284 if (mToolbar != null) mToolbar.hideSuggestions();
Bernhard Bauer 2014/09/10 13:36:55 If this is the desired behavior (see bug), could w
284 mAppMenuHandler.showAppMenu(findViewById(R.id.menu_button), true, fa lse); 285 mAppMenuHandler.showAppMenu(findViewById(R.id.menu_button), true, fa lse);
285 return true; 286 return true;
286 } 287 }
287 return super.onKeyDown(keyCode, event); 288 return super.onKeyDown(keyCode, event);
288 } 289 }
289 290
290 @SuppressWarnings("deprecation") 291 @SuppressWarnings("deprecation")
291 @Override 292 @Override
292 public boolean onOptionsItemSelected(MenuItem item) { 293 public boolean onOptionsItemSelected(MenuItem item) {
293 ChromeShellTab activeTab = getActiveTab(); 294 ChromeShellTab activeTab = getActiveTab();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 @VisibleForTesting 401 @VisibleForTesting
401 public static void setActivityWindowAndroidFactory(ActivityWindowAndroidFact ory factory) { 402 public static void setActivityWindowAndroidFactory(ActivityWindowAndroidFact ory factory) {
402 sWindowAndroidFactory = factory; 403 sWindowAndroidFactory = factory;
403 } 404 }
404 405
405 @VisibleForTesting 406 @VisibleForTesting
406 public static void setAppMenuHandlerFactory(AppMenuHandlerFactory factory) { 407 public static void setAppMenuHandlerFactory(AppMenuHandlerFactory factory) {
407 sAppMenuHandlerFactory = factory; 408 sAppMenuHandlerFactory = factory;
408 } 409 }
409 } 410 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698