| Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| index 6519f4afa973287015d4a536f4ce83cb52041bee..2fc5341f16b7254d6f6baeba500c5d99eded6178 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| @@ -10,6 +10,7 @@ import android.os.IBinder;
|
| import android.support.customtabs.CustomTabsCallback;
|
| import android.support.customtabs.CustomTabsIntent;
|
| import android.text.TextUtils;
|
| +import android.view.KeyEvent;
|
| import android.view.MenuItem;
|
| import android.view.View;
|
| import android.view.View.OnClickListener;
|
| @@ -25,6 +26,7 @@ import org.chromium.chrome.R;
|
| import org.chromium.chrome.browser.ChromeActivity;
|
| import org.chromium.chrome.browser.IntentHandler;
|
| import org.chromium.chrome.browser.IntentHandler.ExternalAppId;
|
| +import org.chromium.chrome.browser.KeyboardShortcuts;
|
| import org.chromium.chrome.browser.appmenu.AppMenuPropertiesDelegate;
|
| import org.chromium.chrome.browser.appmenu.ChromeAppMenuPropertiesDelegate;
|
| import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel.StateChangeReason;
|
| @@ -340,6 +342,13 @@ public class CustomTabActivity extends ChromeActivity {
|
| }
|
|
|
| @Override
|
| + public boolean dispatchKeyEvent(KeyEvent event) {
|
| + Boolean result = KeyboardShortcuts.dispatchKeyEvent(event, this,
|
| + getToolbarManager().isInitialized());
|
| + return result != null ? result : super.dispatchKeyEvent(event);
|
| + }
|
| +
|
| + @Override
|
| public boolean onMenuOrKeyboardAction(int id, boolean fromMenu) {
|
| if (id == R.id.show_menu) {
|
| if (shouldShowAppMenu()) {
|
| @@ -365,6 +374,9 @@ public class CustomTabActivity extends ChromeActivity {
|
| RecordUserAction.record("MobileShortcutFindInPage");
|
| }
|
| return true;
|
| + } else if (id == R.id.focus_url_bar) {
|
| + // Do nothing because url bar in custom tabs is not editable.
|
| + return true;
|
| }
|
| return super.onMenuOrKeyboardAction(id, fromMenu);
|
| }
|
|
|