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

Unified Diff: content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java

Issue 2598163002: WebContentsObserver update for PlzNavigate methods (Closed)
Patch Set: Revert back a state CHECK Created 4 years 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java b/content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java
index c947e078e6a61e0294c718f9262f09bd2f6c62fd..c77c10831b2efdd042773d975693a6b6bba1756c 100644
--- a/content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java
+++ b/content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java
@@ -30,17 +30,29 @@ public abstract class WebContentsObserver {
public void renderProcessGone(boolean wasOomProtected) {}
/**
- * Called when the current navigation finishes.
- *
- * @param isMainFrame Whether the navigation is for the main frame.
+ * Called when the browser process starts a navigation.
+ * @param url The validated URL for the loading page.
+ * @param isInMainFrame Whether the navigation is for the main frame.
+ * @param isErrorPage Whether the navigation shows an error page.
+ */
+ public void didStartNavigation(String url, boolean isInMainFrame, boolean isErrorPage) {}
+
+ /**
+ * Called when the current navigation is finished. This happens when a navigation is committed,
+ * aborted or replaced by a new one.
+ * @param url The validated URL for the loading page.
+ * @param isInMainFrame Whether the navigation is for the main frame.
* @param isErrorPage Whether the navigation shows an error page.
* @param hasCommitted Whether the navigation has committed. This returns true for either
* successful commits or error pages that replace the previous page
* (distinguished by |isErrorPage|), and false for errors that leave the
* user on the previous page.
+ * @param isSamePage Whether the main frame navigation did not cause changes to the
+ * document (for example scrolling to a named anchor or PopState).
+ * @param isReload Whether the navigation is a reload.
*/
- public void didFinishNavigation(
- boolean isMainFrame, boolean isErrorPage, boolean hasCommitted) {}
+ public void didFinishNavigation(String url, boolean isInMainFrame, boolean isErrorPage,
+ boolean hasCommitted, boolean isSamePage, boolean isReload) {}
/**
* Called when the a page starts loading.
@@ -72,6 +84,7 @@ public abstract class WebContentsObserver {
* document (for example scrolling to a named anchor or PopState).
* @param statusCode The HTTP status code of the navigation.
*/
+ @Deprecated
public void didNavigateMainFrame(String url, String baseUrl,
boolean isNavigationToDifferentPage, boolean isFragmentNavigation, int statusCode) {}
@@ -102,6 +115,7 @@ public abstract class WebContentsObserver {
* @param baseUrl The validated base url for the page.
* @param isReload True if this navigation is a reload.
*/
+ @Deprecated
public void didNavigateAnyFrame(String url, String baseUrl, boolean isReload) {}
/**
@@ -118,9 +132,9 @@ public abstract class WebContentsObserver {
* @param validatedUrl The validated URL that is being navigated to.
* @param isErrorPage Whether this is navigating to an error page.
*/
+ @Deprecated
public void didStartProvisionalLoadForFrame(long frameId, long parentFrameId,
- boolean isMainFrame, String validatedUrl, boolean isErrorPage) {
- }
+ boolean isMainFrame, String validatedUrl, boolean isErrorPage) {}
/**
* Notifies that the provisional load was successfully committed. The RenderViewHost is now
@@ -131,6 +145,7 @@ public abstract class WebContentsObserver {
* @param transitionType The transition type as defined in
* {@link org.chromium.ui.base.PageTransition} for the load.
*/
+ @Deprecated
public void didCommitProvisionalLoadForFrame(
long frameId, boolean isMainFrame, String url, int transitionType) {}
@@ -173,6 +188,7 @@ public abstract class WebContentsObserver {
* Called when we started navigation to the pending entry.
* @param url The URL that we are navigating to.
*/
+ @Deprecated
public void didStartNavigationToPendingEntry(String url) {}
/**
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698