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

Unified Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java

Issue 724683002: Keyboard should not be displayed in tab switcher mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
index 74619f9173f90f557b52a85ea0beedfb59d5e64c..c957f49641a553dbab9451bdeb45e1527cd54cbf 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
@@ -76,6 +76,7 @@ public class ChromeShellToolbar extends LinearLayout {
private ImageButton mAddButton;
private int mProgress = 0;
private boolean mLoading = true;
+ private boolean mHasFocus = false;
/**
* @param context The Context the view is running in.
@@ -181,6 +182,7 @@ public class ChromeShellToolbar extends LinearLayout {
mUrlTextView.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
+ mHasFocus = hasFocus;
setKeyboardVisibilityForUrl(hasFocus);
mStopReloadButton.setVisibility(hasFocus ? GONE : VISIBLE);
if (!hasFocus && mTab != null) {
@@ -266,6 +268,8 @@ public class ChromeShellToolbar extends LinearLayout {
public void showAddButton(boolean visibility) {
mAddButton.setVisibility(visibility ? VISIBLE : GONE);
mStopReloadButton.setVisibility(visibility ? GONE : VISIBLE);
+ if (visibility)
+ setKeyboardVisibilityForUrl(mHasFocus);
Bernhard Bauer 2014/11/13 09:35:09 I don't understand this. If |mHasFocus| is false a
divya.bansal 2014/11/13 09:49:07 @Bernhard this case is when focus is not on url fi
Bernhard Bauer 2014/11/13 10:06:30 Could we achieve this by unfocusing the text field
divya.bansal 2014/11/13 10:34:00 But if we unfocus the text field on opening the ta
Bernhard Bauer 2014/11/13 10:45:35 Okay, I see. Could we simply hide the keyboard wh
divya.bansal 2014/11/13 11:47:51 Done.
}
/**
« 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