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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/ResolvedSearchAction.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: Changed passing the text sample to java -- now it's by Java request only (currently unused). Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.contextualsearch.action;
6
7 import org.chromium.chrome.browser.contextualsearch.gesture.SearchGestureHost;
8
9 /**
10 * Represents a Search Action that will gather and examine surrounding text in o rder to
11 * "resolve" what to search for.
12 * Right now this class is just being used to extract surrounding context for a tap
13 * action before issuing the resolution request to determine if we want to suppr ess
14 * the tap. Longer term it will actually do the resolution request & search requ est.
15 * This is part of the 2016-refactoring (crbug.com/624609, go/cs-refactoring-201 6).
16 */
17 public class ResolvedSearchAction extends SearchAction {
18 // ========================================================================= ===================
19 // Constructor
20 // ========================================================================= ===================
21
22 public ResolvedSearchAction(SearchActionListener listener, SearchGestureHost host) {
23 super(listener, host);
24 }
25
26 // ========================================================================= ===================
27 // Abstract implementations
28 // ========================================================================= ===================
29
30 @Override
31 public void extractContext() {
32 requestSurroundingText();
33 }
34
35 // ========================================================================= ===================
36 // State handling
37 // ========================================================================= ===================
38
39 @Override
40 protected void onSurroundingTextResponse() {
41 super.onSurroundingTextResponse();
42
43 notifyContextReady();
44 }
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698