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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java

Issue 2604543002: WebContentsObserver and TabObserver update for PlzNavigate (Closed)
Patch Set: nits 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: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java
index 0134c19986bc752476b0721c907d638e1b5b061c..55602803342fb09c40b8f74947c98e55e0d568cc 100644
--- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java
+++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java
@@ -77,10 +77,19 @@ class WebContentsObserverProxy extends WebContentsObserver {
@Override
@CalledByNative
- public void didFinishNavigation(
- boolean isMainFrame, boolean isErrorPage, boolean hasCommitted) {
+ public void didStartNavigation(String url, boolean isInMainFrame, boolean isErrorPage) {
for (mObserversIterator.rewind(); mObserversIterator.hasNext();) {
- mObserversIterator.next().didFinishNavigation(isMainFrame, isErrorPage, hasCommitted);
+ mObserversIterator.next().didStartNavigation(url, isInMainFrame, isErrorPage);
+ }
+ }
+
+ @CalledByNative
+ public void didFinishNavigation(String url, boolean isInMainFrame, boolean isErrorPage,
+ boolean hasCommitted, boolean isSamePage, int transition, int errorCode) {
+ Integer pageTransition = transition == -1 ? null : transition;
+ for (mObserversIterator.rewind(); mObserversIterator.hasNext();) {
+ mObserversIterator.next().didFinishNavigation(url, isInMainFrame, isErrorPage,
+ hasCommitted, isSamePage, pageTransition, errorCode);
}
}

Powered by Google App Engine
This is Rietveld 408576698