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

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

Issue 312673007: Fix a problem that the suggestion popup does not disappear when initiating navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java » ('j') | 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 ece8c4ef514b0b0447c0fb26f3e14ce776383183..3df6a38e84f5044628befb37a9b0ba708f64f490 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
@@ -47,6 +47,8 @@ public class ChromeShellToolbar extends LinearLayout {
private AppMenuHandler mMenuHandler;
private AppMenuButtonHelper mAppMenuButtonHelper;
+ private SuggestionPopup mSuggestionPopup;
+
/**
* @param context The Context the view is running in.
* @param attrs The attributes of the XML tag that is inflating the view.
@@ -102,6 +104,7 @@ public class ChromeShellToolbar extends LinearLayout {
return false;
}
+ mSuggestionPopup.dismissPopup();
mTab.loadUrlWithSanitization(mUrlTextView.getText().toString());
mUrlTextView.clearFocus();
setKeyboardVisibilityForUrl(false);
@@ -118,7 +121,9 @@ public class ChromeShellToolbar extends LinearLayout {
}
}
});
- mUrlTextView.addTextChangedListener(new SuggestionPopup(getContext(), mUrlTextView, this));
+
+ mSuggestionPopup = new SuggestionPopup(getContext(), mUrlTextView, this);
+ mUrlTextView.addTextChangedListener(mSuggestionPopup);
}
private void initializeMenuButton() {
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698