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

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

Issue 2211353002: [TTS] Gather surrounding text on Tap before any UX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused code and consolidated two functions, updated comments. Created 4 years, 3 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/action/SearchActionListener.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchActionListener.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchActionListener.java
new file mode 100644
index 0000000000000000000000000000000000000000..97df00db19b5b129b88dc7e16dc7af87ceca4786
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchActionListener.java
@@ -0,0 +1,36 @@
+// Copyright 2016 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.action;
+
+/**
+ * Listens to notifications sent by the {@link SearchAction} class.
+ * This is part of the 2016-refactoring (crbug.com/624609, go/cs-refactoring-2016).
+ */
+public class SearchActionListener {
+ /**
+ * Indicates that the Contextual Search Context, which includes the selected word
+ * and surrounding text, is ready to be accessed.
+ * @param action The {@link SearchAction} whose context is ready.
+ */
+ protected void onContextReady(SearchAction action) {}
+
+ /**
+ * Indicates that the {@code SearchAction} has been accepted (not suppressed).
+ * @param action The {@link SearchAction} that has been accepted.
+ */
+ protected void onActionAccepted(SearchAction action) {}
+
+ /**
+ * Indicates that the {@code SearchAction} has been suppressed (not accepted).
+ * @param action The {@link SearchAction} that has been suppressed.
+ */
+ protected void onActionSuppressed(SearchAction action) {}
+
+ /**
+ * Indicates that the {@code SearchAction} has ended.
+ * @param action The {@link SearchAction} that has ended.
+ */
+ protected void onActionEnded(SearchAction action) {}
+}

Powered by Google App Engine
This is Rietveld 408576698