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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java

Issue 2604543002: WebContentsObserver and TabObserver update for PlzNavigate (Closed)
Patch Set: Code with new API without any real hookup Created 3 years, 11 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/tab/TabObserver.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java
index 58438a391cd77372349a793883d0b484a2034664..2b515317f22b01325dde454449e8358b7a33b829 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java
@@ -242,6 +242,35 @@ public interface TabObserver {
boolean isNavigationToDifferentPage, boolean isFragmentNavigation, int statusCode);
/**
+ * Called when a navigation is started in the WebContents.
+ * @param tab The notifying {@link Tab}.
+ * @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 onDidStartNavigation(
+ Tab tab, String url, boolean isInMainFrame, boolean isErrorPage);
+
+ /**
+ * Called when a navigation is finished i.e. committed, aborted or replaced by a new one.
+ * @param tab The notifying {@link Tab}.
+ * @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.
+ * @param errorCode The net error code if an error occurred prior to commit, otherwise net::OK.
+ */
+ public void onDidFinishNavigation(Tab tab, String url, boolean isInMainFrame,
+ boolean isErrorPage, boolean hasCommitted, boolean isSamePage, boolean isReload,
+ int errorCode);
+
+ /**
* Called when the page has painted something non-empty.
* @param tab The notifying {@link Tab}.
*/

Powered by Google App Engine
This is Rietveld 408576698