OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.chrome.browser.tab; | 5 package org.chromium.chrome.browser.tab; |
6 | 6 |
7 import android.graphics.Bitmap; | 7 import android.graphics.Bitmap; |
| 8 import android.support.annotation.Nullable; |
8 import android.view.ContextMenu; | 9 import android.view.ContextMenu; |
9 | 10 |
10 import org.chromium.chrome.browser.TabLoadStatus; | 11 import org.chromium.chrome.browser.TabLoadStatus; |
11 import org.chromium.content.browser.ContentViewCore; | 12 import org.chromium.content.browser.ContentViewCore; |
12 import org.chromium.content_public.browser.LoadUrlParams; | 13 import org.chromium.content_public.browser.LoadUrlParams; |
13 import org.chromium.content_public.browser.WebContents; | 14 import org.chromium.content_public.browser.WebContents; |
14 | 15 |
15 /** | 16 /** |
16 * An observer that is notified of changes to a {@link Tab} object. | 17 * An observer that is notified of changes to a {@link Tab} object. |
17 */ | 18 */ |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 * @param isNavigationToDifferentPage Whether the main frame navigated to a
different page. | 236 * @param isNavigationToDifferentPage Whether the main frame navigated to a
different page. |
236 * @param isFragmentNavigation Whether the main frame navigation did
not cause changes | 237 * @param isFragmentNavigation Whether the main frame navigation did
not cause changes |
237 * to the document (for example scrolling
to a named anchor | 238 * to the document (for example scrolling
to a named anchor |
238 * or PopState). | 239 * or PopState). |
239 * @param statusCode The HTTP status code of the navigation
. | 240 * @param statusCode The HTTP status code of the navigation
. |
240 */ | 241 */ |
241 public void onDidNavigateMainFrame(Tab tab, String url, String baseUrl, | 242 public void onDidNavigateMainFrame(Tab tab, String url, String baseUrl, |
242 boolean isNavigationToDifferentPage, boolean isFragmentNavigation, i
nt statusCode); | 243 boolean isNavigationToDifferentPage, boolean isFragmentNavigation, i
nt statusCode); |
243 | 244 |
244 /** | 245 /** |
| 246 * Called when a navigation is started in the WebContents. |
| 247 * @param tab The notifying {@link Tab}. |
| 248 * @param url The validated URL for the loading page. |
| 249 * @param isInMainFrame Whether the navigation is for the main frame. |
| 250 * @param isErrorPage Whether the navigation shows an error page. |
| 251 */ |
| 252 public void onDidStartNavigation( |
| 253 Tab tab, String url, boolean isInMainFrame, boolean isErrorPage); |
| 254 |
| 255 /** |
| 256 * Called when a navigation is finished i.e. committed, aborted or replaced
by a new one. |
| 257 * @param tab The notifying {@link Tab}. |
| 258 * @param url The validated URL for the loading page. |
| 259 * @param isInMainFrame Whether the navigation is for the main frame. |
| 260 * @param isErrorPage Whether the navigation shows an error page. |
| 261 * @param hasCommitted Whether the navigation has committed. This returns tr
ue for either |
| 262 * successful commits or error pages that replace the pr
evious page |
| 263 * (distinguished by |isErrorPage|), and false for error
s that leave the |
| 264 * user on the previous page. |
| 265 * @param isSamePage Whether the main frame navigation did not cause changes
to the |
| 266 * document (for example scrolling to a named anchor or Po
pState). |
| 267 * @param pageTransition The page transition type associated with this navig
ation. |
| 268 * @param errorCode The net error code if an error occurred prior to commit,
otherwise net::OK. |
| 269 */ |
| 270 public void onDidFinishNavigation(Tab tab, String url, boolean isInMainFrame
, |
| 271 boolean isErrorPage, boolean hasCommitted, boolean isSamePage, |
| 272 @Nullable Integer pageTransition, int errorCode); |
| 273 |
| 274 /** |
245 * Called when the page has painted something non-empty. | 275 * Called when the page has painted something non-empty. |
246 * @param tab The notifying {@link Tab}. | 276 * @param tab The notifying {@link Tab}. |
247 */ | 277 */ |
248 public void didFirstVisuallyNonEmptyPaint(Tab tab); | 278 public void didFirstVisuallyNonEmptyPaint(Tab tab); |
249 | 279 |
250 /** | 280 /** |
251 * Called when the theme color is changed | 281 * Called when the theme color is changed |
252 * @param tab The notifying {@link Tab}. | 282 * @param tab The notifying {@link Tab}. |
253 * @param color the new color in ARGB format. | 283 * @param color the new color in ARGB format. |
254 */ | 284 */ |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 public void webContentsCreated(Tab tab, WebContents sourceWebContents, | 323 public void webContentsCreated(Tab tab, WebContents sourceWebContents, |
294 long openerRenderProcessId, long openerRenderFrameId, String frameNa
me, | 324 long openerRenderProcessId, long openerRenderFrameId, String frameNa
me, |
295 String targetUrl, WebContents newWebContents); | 325 String targetUrl, WebContents newWebContents); |
296 | 326 |
297 /** | 327 /** |
298 * Called when the tab reparenting process has finished. | 328 * Called when the tab reparenting process has finished. |
299 * @param tab The notifying {@link Tab}. | 329 * @param tab The notifying {@link Tab}. |
300 */ | 330 */ |
301 public void onReparentingFinished(Tab tab); | 331 public void onReparentingFinished(Tab tab); |
302 } | 332 } |
OLD | NEW |