OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |