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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java

Issue 1354763003: [Contextual Search] Trigger the translation one-box. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comment about test infrastructure needing to be updated when shifting to new API. Created 5 years, 1 month 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.contextualsearch; 5 package org.chromium.chrome.browser.contextualsearch;
6 6
7 import java.net.URL; 7 import java.net.URL;
8 8
9 import javax.annotation.Nullable; 9 import javax.annotation.Nullable;
10 10
(...skipping 15 matching lines...) Expand all
26 * @param isNetworkUnavailable whether the network is available. 26 * @param isNetworkUnavailable whether the network is available.
27 * @param responseCode the server's HTTP response code. 27 * @param responseCode the server's HTTP response code.
28 * @param searchTerm the term to search for. 28 * @param searchTerm the term to search for.
29 * @param displayText the text to display that describes the search term. 29 * @param displayText the text to display that describes the search term.
30 * @param alternateTerm the alternate search term. 30 * @param alternateTerm the alternate search term.
31 * @param doPreventPreload whether to prevent preloading the search result. 31 * @param doPreventPreload whether to prevent preloading the search result.
32 * @param selectionStartAdjust The start offset adjustment of the selection to use to highlight 32 * @param selectionStartAdjust The start offset adjustment of the selection to use to highlight
33 * the search term. 33 * the search term.
34 * @param selectionEndAdjust The end offset adjustment of the selection to u se to highlight 34 * @param selectionEndAdjust The end offset adjustment of the selection to u se to highlight
35 * the search term. 35 * the search term.
36 * @param contextLanguage The language of the context, or the empty string i f unknown.
36 */ 37 */
37 void handleSearchTermResolutionResponse(boolean isNetworkUnavailable, int re sponseCode, 38 void handleSearchTermResolutionResponse(boolean isNetworkUnavailable, int re sponseCode,
38 String searchTerm, String displayText, String alternateTerm, boolean doPreventPreload, 39 String searchTerm, String displayText, String alternateTerm, boolean doPreventPreload,
39 int selectionStartAdjust, int selectionEndAdjust); 40 int selectionStartAdjust, int selectionEndAdjust, String contextLang uage);
40 41
41 // ------------------------------------------------------------------------- ------------------- 42 // ------------------------------------------------------------------------- -------------------
42 // These are non-network actions that need to be stubbed out for testing. 43 // These are non-network actions that need to be stubbed out for testing.
43 // ------------------------------------------------------------------------- ------------------- 44 // ------------------------------------------------------------------------- -------------------
44 45
45 /** 46 /**
46 * Gets the URL of the base page. 47 * Gets the URL of the base page.
47 * TODO(donnd): move to another interface, or rename this interface: 48 * TODO(donnd): move to another interface, or rename this interface:
48 * This is needed to stub out for testing, but has nothing to do with networ king. 49 * This is needed to stub out for testing, but has nothing to do with networ king.
49 * @return The URL of the base page (needed for testing purposes). 50 * @return The URL of the base page (needed for testing purposes).
50 */ 51 */
51 @Nullable URL getBasePageUrl(); 52 @Nullable URL getBasePageUrl();
52 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698