Chromium Code Reviews| 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..641128d36a0ff9eb3875ecfa39648f5ef5517079 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,30 @@ 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). |
|
Ted C
2017/01/06 21:50:59
reduce intent to align with "Whether the " above.
|
| + * @param isReload Whether the navigation is a reload. |
| + * @param errorCode The net error code if an error occurred prior to commit, otherwise net::OK. |
| */ |
| - public void didFinishNavigation( |
| - boolean isMainFrame, boolean isErrorPage, boolean hasCommitted) {} |
| + public void didFinishNavigation(String url, boolean isInMainFrame, boolean isErrorPage, |
| + boolean hasCommitted, boolean isSamePage, boolean isReload, int errorCode) {} |
|
Ted C
2017/01/06 21:51:00
Here if we pass Integer pageTransitionType, I woul
|
| /** |
| * Called when the a page starts loading. |
| @@ -56,6 +69,7 @@ public abstract class WebContentsObserver { |
| /** |
| * Called when an error occurs while loading a page and/or the page fails to load. |
| + * @param isMainFrame Whether the navigation occurred in main frame. |
| * @param errorCode Error code for the occurring error. |
| * @param description The description for the error. |
| * @param failingUrl The url that was loading when the error occurred. |