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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java

Issue 1304013002: Move functionality for ContentViewCore to ContextualSearchPanel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple-move-cvc-to-panel
Patch Set: Rebase & revert ContextualSearchRequest Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
index a11a54e71b9e16ff6fb5abc5d648cf3e98e87c5b..98f630c8206bab0e906abcf7431c468e0b854430 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
@@ -4,12 +4,11 @@
package org.chromium.chrome.browser.compositor.bottombar.contextualsearch;
+import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel.PanelState;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel.StateChangeReason;
-import org.chromium.components.navigation_interception.InterceptNavigationDelegate;
-import org.chromium.components.web_contents_delegate_android.WebContentsDelegateAndroid;
+import org.chromium.chrome.browser.contextualsearch.ContextualSearchContentController;
import org.chromium.content.browser.ContentViewCore;
-import org.chromium.content_public.browser.WebContents;
/**
* The delegate that that interfaces with the {@link ContextualSearchPanel}.
@@ -83,22 +82,6 @@ public interface ContextualSearchPanelDelegate {
void updateBasePageSelectionYPx(float y);
/**
- * Handles the onLoadStarted event in the WebContents.
- */
- void onLoadStarted();
-
- /**
- * Handles the onLoadStopped event in the WebContents.
- */
- void onLoadStopped();
-
- /**
- * Handles the onLoadProgressChanged event in the WebContents.
- * @param progress The loading progress in percentage (from 0 to 100).
- */
- void onLoadProgressChanged(int progress);
-
- /**
* @return The panel's state.
*/
PanelState getPanelState();
@@ -148,41 +131,40 @@ public interface ContextualSearchPanelDelegate {
ContentViewCore getContentViewCore();
/**
- * Set this panel's ContentViewCore to null.
+ * Remove the last entry from history provided it is in a given time frame.
+ * @param historyUrl The URL to remove.
+ * @param urlTimeMs The time that the URL was visited.
*/
- void resetContentViewCore();
+ void removeLastHistoryEntry(String historyUrl, long urlTimeMs);
/**
- * Destroy the native components of this class.
+ * @param activity The current active ChromeActivity.
*/
- void destroy();
+ void setChromeActivity(ChromeActivity activity);
/**
- * Remove the last entry from history provided it is in a given time frame.
- * @param historyUrl The URL to remove.
- * @param urlTimeMs The time that the URL was visited.
+ * Load a URL in the panel ContentViewCore.
+ * @param url The URL to load.
*/
- void removeLastHistoryEntry(String historyUrl, long urlTimeMs);
+ void loadUrlInPanel(String url);
/**
- * Set the WebContents
+ * @return True if the ContentViewCore is being shown.
*/
- void setWebContents(ContentViewCore contentView, WebContentsDelegateAndroid delegate);
+ boolean isContentViewShowing();
/**
- * Destroy the web contents associated with this object.
+ * Create a new ContentViewCore for this panel.
*/
- void destroyWebContents();
+ void createNewPanelContentView();
/**
- * Reset the native handle to the WebContents.
+ * Set the ContextualSearchContentController (for testing).
*/
- void releaseWebContents();
+ void setContentController(ContextualSearchContentController controller);
/**
- * @param delegate InterceptNavigationDelegate to use.
- * @param webContents The WebContents to associate with the delegate.
+ * @return The current content controller.
*/
- void setInterceptNavigationDelegate(
- InterceptNavigationDelegate delegate, WebContents webContents);
+ ContextualSearchContentController getContentController();
}

Powered by Google App Engine
This is Rietveld 408576698