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

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

Issue 1206673003: Merge java_staging/src into java/src. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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_staging/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java
diff --git a/chrome/android/java_staging/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java b/chrome/android/java_staging/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java
deleted file mode 100644
index 3a823da5b36ec302aa6d75f1c56b3fba34513efa..0000000000000000000000000000000000000000
--- a/chrome/android/java_staging/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 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 java.net.URL;
-
-import javax.annotation.Nullable;
-
-
-/**
- * An interface for network communication between the Contextual Search client and server.
- */
-public interface ContextualSearchNetworkCommunicator {
-
- /**
- * Starts a Search Term Resolution request.
- * When the response comes back {@link #handleSearchTermResolutionResponse} will be called.
- * @param selection the current selected text.
- */
- void startSearchTermResolutionRequest(String selection);
-
- /**
- * Handles a Search Term Resolution response.
- * @param isNetworkUnavailable whether the network is available.
- * @param responseCode the server's HTTP response code.
- * @param searchTerm the term to search for.
- * @param displayText the text to display that describes the search term.
- * @param alternateTerm the alternate search term.
- * @param doPreventPreload whether to prevent preloading the search result.
- */
- void handleSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode,
- String searchTerm, String displayText, String alternateTerm, boolean doPreventPreload);
-
- /**
- * Loads a URL in the search content view.
- * @param url the URL of the page to load.
- */
- void loadUrl(String url);
-
- // --------------------------------------------------------------------------------------------
- // These are non-network actions that need to be stubbed out for testing.
- // --------------------------------------------------------------------------------------------
-
- /**
- * Gets the URL of the base page.
- * TODO(donnd): move to another interface, or rename this interface:
- * This is needed to stub out for testing, but has nothing to do with networking.
- * @return The URL of the base page (needed for testing purposes).
- */
- @Nullable URL getBasePageUrl();
-
- /**
- * Handles the WebContentsObserver#didNavigateMainFrame callback.
- * @param url The URL of the navigation.
- * @param httpResultCode The HTTP result code of the navigation.
- */
- void handleDidNavigateMainFrame(String url, int httpResultCode);
-
- /**
- * Creates and sets up a new Search Panel's {@code ContentViewCore}. If there's an existing
- * {@code ContentViewCore} being used, it will be destroyed first. This should be called as
- * late as possible to avoid unnecessarily consuming memory.
- */
- void createNewSearchContentView();
-
- /**
- * Destroys the Search Panel's {@code ContentViewCore}.
- */
- void destroySearchContentView();
-}

Powered by Google App Engine
This is Rietveld 408576698