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

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

Issue 1133403004: Revert of [Contextual Search] Remove opt-in code. (patchset #6 id:100001 of https://codereview.chro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2403
Patch Set: Created 5 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/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchControl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchControl.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchControl.java
index f6206a891c45bb92deea3e244591e7b038fd6eca..17853b0110ca614a84fc49962bf7532b6e95ca45 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchControl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchControl.java
@@ -82,6 +82,23 @@ public class ContextualSearchControl extends LinearLayout {
}
/**
+ * Sets the text to display on top of the first-run promo.
+ * @param selection The portion of the text that represents the user's selection.
+ */
+ public void setFirstRunText(String selection) {
+ // TODO(pedrosimonetti): confirm that is okay to remove the experimental text
+// String firstRunText = ContextualSearchFieldTrial.getEnglishExperimentFirstRunText(
+// selection);
+// if (firstRunText == null) {
+// firstRunText =
+// getContext().getString(R.string.contextual_search_action_bar, selection);
+// }
+ String firstRunText =
+ getContext().getString(R.string.contextual_search_action_bar, selection);
+ setCentralText(firstRunText);
+ }
+
+ /**
* Sets the search context to display in the control.
* @param selection The portion of the context that represents the user's selection.
* @param start The portion of the context from its start to the selection.

Powered by Google App Engine
This is Rietveld 408576698