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

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

Issue 287293004: [ChromeShell] Add suggestions for ChromeShell toolbar box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed TemplateUrlServiceTest 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
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 07d01ef086e2df53883680da8ac85b15562b1bb7..ece8c4ef514b0b0447c0fb26f3e14ce776383183 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
@@ -23,6 +23,7 @@ import org.chromium.chrome.browser.Tab;
import org.chromium.chrome.browser.TabObserver;
import org.chromium.chrome.browser.appmenu.AppMenuButtonHelper;
import org.chromium.chrome.browser.appmenu.AppMenuHandler;
+import org.chromium.chrome.shell.omnibox.SuggestionPopup;
/**
* A Toolbar {@link View} that shows the URL and navigation buttons.
@@ -117,6 +118,7 @@ public class ChromeShellToolbar extends LinearLayout {
}
}
});
+ mUrlTextView.addTextChangedListener(new SuggestionPopup(getContext(), mUrlTextView, this));
}
private void initializeMenuButton() {
@@ -135,7 +137,18 @@ public class ChromeShellToolbar extends LinearLayout {
});
}
- private void setKeyboardVisibilityForUrl(boolean visible) {
+ /**
+ * @return Current tab that is shown by ChromeShell.
+ */
+ public ChromeShellTab getCurrentTab() {
+ return mTab;
+ }
+
+ /**
+ * Change the visibility of the software keyboard.
+ * @param visible Whether the keyboard should be shown or hidden.
+ */
+ public void setKeyboardVisibilityForUrl(boolean visible) {
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(
Context.INPUT_METHOD_SERVICE);
if (visible) {

Powered by Google App Engine
This is Rietveld 408576698