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

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

Issue 1155713005: Use a resource throttle to implement shouldOverrideUrlLoading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add flag showing that shouldOverrideUrl cancelled the navigation Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content_public.browser; 5 package org.chromium.content_public.browser;
6 6
7 import java.lang.ref.WeakReference; 7 import java.lang.ref.WeakReference;
8 8
9 /** 9 /**
10 * This class receives callbacks that act as hooks for various a native web cont ents events related 10 * This class receives callbacks that act as hooks for various a native web cont ents events related
(...skipping 30 matching lines...) Expand all
41 */ 41 */
42 public void didStopLoading(String url) {} 42 public void didStopLoading(String url) {}
43 43
44 /** 44 /**
45 * Called when an error occurs while loading a page and/or the page fails to load. 45 * Called when an error occurs while loading a page and/or the page fails to load.
46 * @param errorCode Error code for the occurring error. 46 * @param errorCode Error code for the occurring error.
47 * @param description The description for the error. 47 * @param description The description for the error.
48 * @param failingUrl The url that was loading when the error occurred. 48 * @param failingUrl The url that was loading when the error occurred.
49 */ 49 */
50 public void didFailLoad(boolean isProvisionalLoad, boolean isMainFrame, int errorCode, 50 public void didFailLoad(boolean isProvisionalLoad, boolean isMainFrame, int errorCode,
51 String description, String failingUrl) {} 51 String description, String failingUrl, boolean wasIgnoredByHandler) {}
52 52
53 /** 53 /**
54 * Called when the main frame of the page has committed. 54 * Called when the main frame of the page has committed.
55 * @param url The validated url for the page. 55 * @param url The validated url for the page.
56 * @param baseUrl The validated base url for the page. 56 * @param baseUrl The validated base url for the page.
57 * @param isNavigationToDifferentPage Whether the main frame navigated to a different page. 57 * @param isNavigationToDifferentPage Whether the main frame navigated to a different page.
58 * @param isFragmentNavigation Whether the main frame navigation did not cau se changes to the 58 * @param isFragmentNavigation Whether the main frame navigation did not cau se changes to the
59 * document (for example scrolling to a named an chor or PopState). 59 * document (for example scrolling to a named an chor or PopState).
60 * @param statusCode The HTTP status code of the navigation. 60 * @param statusCode The HTTP status code of the navigation.
61 */ 61 */
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 public void destroy() { 153 public void destroy() {
154 if (mWebContents == null) return; 154 if (mWebContents == null) return;
155 final WebContents webContents = mWebContents.get(); 155 final WebContents webContents = mWebContents.get();
156 mWebContents = null; 156 mWebContents = null;
157 if (webContents == null) return; 157 if (webContents == null) return;
158 webContents.removeObserver(this); 158 webContents.removeObserver(this);
159 } 159 }
160 160
161 protected WebContentsObserver() {} 161 protected WebContentsObserver() {}
162 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698