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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchStateControlled.java

Issue 2703473002: [TTS] Extract tapped text before showing UI. (Closed)
Patch Set: Minor update. Created 3 years, 9 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/contextualsearch/ContextualSearchStateControlled.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchStateControlled.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchStateControlled.java
new file mode 100644
index 0000000000000000000000000000000000000000..731b0d42be9c46b5bac25770495a072681f188eb
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchStateControlled.java
@@ -0,0 +1,54 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.contextualsearch;
+
+import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason;
+
+/**
+ * An interface for state-controlled asynchronous operations driven by the
+ * {@link ContextualSearchStateController} class and implemented by the {@link
+ * ContextualSearchManager}.
+ */
+public interface ContextualSearchStateControlled {
+ /**
+ * Hides the Contextual Search UX.
+ */
+ void hideContextualSearchUx(StateChangeReason reason);
Theresa 2017/03/28 15:52:55 nit: UX = user experience, UI = user interface, so
Donn Denman 2017/03/29 18:56:51 Done here and below.
+
+ /**
+ * Shows the Contextual Search UX.
+ */
+ void showContextualSearchUx(StateChangeReason reason);
+
+ /**
+ * Gathers text surrounding the current selection, which may have been created by either a Tap
+ * or a Long-press gesture.
+ */
+ void gatherSurroundingText();
+
+ /**
+ * Waits for possible navigation.
+ * Many web pages have non-link elements that actually do navigation, so we pause before
+ * advancing to the next processing state in order to detect the navigation before showing our
+ * UX.
+ * See crbug.com/428368.
+ */
+ void waitForPossibleNavigation();
+
+ /**
+ * Starts the process of selecting a word around the current caret.
+ */
+ void selectWordAroundCaret();
+
+ /**
+ * Starts a Resolve request to our server for the best Search Term.
+ */
+ void startSearchTermResolutionRequest();
+
+ /**
+ * Starts the process of deciding if we'll suppress the current Tap gesture or not.
+ */
+ void decideTapSuppression();
+}

Powered by Google App Engine
This is Rietveld 408576698