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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java

Issue 2449653002: [Contextual Search] Add support for a static icon (Closed)
Patch Set: Changes from donnd@ review Created 4 years, 2 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/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
index db1e4e2202e77989f02323f1e0d25f6a7585695b..4eaa4f0bed130a7afd47c6ac74b014d894c2f5ff 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
@@ -252,7 +252,7 @@ public class ContextualSearchPanel extends OverlayPanel {
setProgressBarCompletion(0);
setProgressBarVisible(false);
- getImageControl().hideThumbnail(false);
+ getImageControl().hideStaticIcon(false);
super.onClosed(reason);
@@ -490,7 +490,7 @@ public class ContextualSearchPanel extends OverlayPanel {
* @param searchTerm The string that represents the search term.
*/
public void setSearchTerm(String searchTerm) {
- getImageControl().hideThumbnail(true);
+ getImageControl().hideStaticIcon(true);
getSearchBarControl().setSearchTerm(searchTerm);
mPanelMetrics.onSearchRequestStarted();
}
@@ -501,7 +501,7 @@ public class ContextualSearchPanel extends OverlayPanel {
* @param end The portion of the context from the selection to its end.
*/
public void setSearchContext(String selection, String end) {
- getImageControl().hideThumbnail(true);
+ getImageControl().hideStaticIcon(true);
getSearchBarControl().setSearchContext(selection, end);
mPanelMetrics.onSearchRequestStarted();
}
@@ -664,19 +664,11 @@ public class ContextualSearchPanel extends OverlayPanel {
// ============================================================================================
// Image Control
// ============================================================================================
-
- // TODO(twellington): The image control should move to ContextualSearchBarControl since it
- // is a part of the Bar.
- private ContextualSearchImageControl mImageControl;
-
/**
* @return The {@link ContextualSearchImageControl} for the panel.
*/
public ContextualSearchImageControl getImageControl() {
- if (mImageControl == null) {
- mImageControl = new ContextualSearchImageControl(this, mContext);
- }
- return mImageControl;
+ return getSearchBarControl().getImageControl();
}
// ============================================================================================

Powered by Google App Engine
This is Rietveld 408576698