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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagementDelegate.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: remove extra override Created 5 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/ContextualSearchManagementDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagementDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagementDelegate.java
index d0c8932667a7db4af11542b3cddbbc2c6fa9d428..f76fbb8d11a809f1e4faa68383a36a5ec0471bc7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagementDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagementDelegate.java
@@ -7,7 +7,9 @@ package org.chromium.chrome.browser.contextualsearch;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel.StateChangeReason;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanelDelegate;
import org.chromium.chrome.browser.customtabs.CustomTab;
+import org.chromium.chrome.browser.externalnav.ExternalNavigationHandler;
import org.chromium.chrome.browser.tab.Tab;
+import org.chromium.components.navigation_interception.NavigationParams;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content_public.common.TopControlsState;
@@ -54,11 +56,6 @@ public interface ContextualSearchManagementDelegate {
void promoteToTab();
/**
- * Resets the Search Content View scroll position.
- */
- void resetSearchContentViewScroll();
-
- /**
* Gets the Search Content View's vertical scroll position. If the Search Content View
* is not available it returns -1.
* @return The Search Content View scroll position.
@@ -71,7 +68,7 @@ public interface ContextualSearchManagementDelegate {
* it invisible, only visible.
* @param isVisible True to make it visible.
*/
- void setSearchContentViewVisibility(boolean isVisible);
+ //void setSearchContentViewVisibility(boolean isVisible);
pedro (no code reviews) 2015/09/02 22:59:26 Remove this method, if not used.
mdjones 2015/09/03 17:07:32 Whoops. Done.
/**
* Sets the delegate responsible for manipulating the ContextualSearchLayout.
@@ -123,4 +120,60 @@ public interface ContextualSearchManagementDelegate {
* @return Whether the current activity contains a {@link CustomTab}.
*/
boolean isCustomTab();
+
+ /**
+ * This method is called when the panel's ContentViewCore is created.
+ * @param contentView The created ContentViewCore.
+ */
+ void onContentViewCreated(ContentViewCore contentView);
+
+ /**
+ * This method is called when the panel's ContentViewCore is destroyed.
+ */
+ void onContentViewDestroyed();
+
+ /**
+ * This is called on navigation of the contextual search pane This is called on navigation
+ * of the contextual search panel.
+ * @param isFailure If the request resulted in an error page.
+ */
+ void onContextualSearchRequestNavigation(boolean isFailure);
+
+ /**
+ * This is called when the search panel is shown or is hidden.
+ * @param isVisible True if the panel is now visible.
+ */
+ void onContentViewVisibilityChanged(boolean isVisible);
+
+ /**
+ * This is called when the panel has loaded search results.
+ */
+ void onSearchResultsLoaded();
+
+ /**
+ * Called when an external navigation occurs.
+ * @param url The URL being navigated to.
+ */
+ void onExternalNavigation(String url);
+
+ /**
+ * 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);
+
+ /**
+ * Called when the WebContents for the panel starts loading.
+ */
+ void onStartedLoading();
+
+ /**
+ * Determine if a particular navigation should be ignored.
+ * @param externalNavHandler External navigation handler for the activity the panel is in.
+ * @param navigationParams The navigation params for the current navigation.
+ * @return True if the navigation should be ignored.
+ */
+ boolean shouldIgnoreNavigation(ExternalNavigationHandler externalNavHandler,
pedro (no code reviews) 2015/09/02 22:59:26 Nit: I think this should be called shouldIntercept
mdjones 2015/09/03 17:07:32 Done.
+ NavigationParams navigationParams);
}

Powered by Google App Engine
This is Rietveld 408576698