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

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

Issue 2642303002: PlzNavigate: Chrome UI changes for new methods of WebContentsObserver (Closed)
Patch Set: jam@ comments Created 3 years, 10 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/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 9f97f23f810dfe48d007672441057d7d73deea0c..529ab28168faf9658d010f81a7921dc0b235ed50 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -132,19 +132,14 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
}
@Override
- public void didFailLoad(boolean isProvisionalLoad, boolean isMainFrame, int errorCode,
- String description, String failingUrl, boolean wasIgnoredByHandler) {
- // Navigation that fails the provisional load will have the strong binding removed
- // here. One for which the provisional load is commited will have the strong binding
- // removed in navigationEntryCommitted() below.
- if (isProvisionalLoad) determinedProcessVisibility();
- }
+ public void didFinishNavigation(String url, boolean isInMainFrame, boolean isErrorPage,
+ boolean hasCommitted, boolean isSamePage, boolean isFragmentNavigation,
+ Integer pageTransition, int errorCode, int httpStatusCode) {
+ determinedProcessVisibility();
- @Override
- public void didNavigateMainFrame(String url, String baseUrl,
- boolean isNavigationToDifferentPage, boolean isFragmentNavigation, int statusCode) {
- if (!isNavigationToDifferentPage) return;
- resetPopupsAndInput();
+ if (hasCommitted && isInMainFrame && !isSamePage) {
boliu 2017/02/07 18:38:18 is the hasCommitted check necessary? if this is sk
shaktisahu 2017/02/07 20:09:49 Yes, hasCommitted is true for successful commits o
+ resetPopupsAndInput();
+ }
}
@Override
@@ -155,11 +150,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
contentViewCore.mImeAdapter.resetAndHideKeyboard();
}
- @Override
- public void navigationEntryCommitted() {
- determinedProcessVisibility();
- }
-
private void resetPopupsAndInput() {
ContentViewCore contentViewCore = mWeakContentViewCore.get();
if (contentViewCore == null) return;

Powered by Google App Engine
This is Rietveld 408576698