OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.android_webview; | 5 package org.chromium.android_webview; |
6 | 6 |
7 import org.chromium.content.browser.WebContentsObserverAndroid; | 7 import org.chromium.content.browser.WebContentsObserver; |
8 import org.chromium.content_public.browser.WebContents; | 8 import org.chromium.content_public.browser.WebContents; |
9 import org.chromium.net.NetError; | 9 import org.chromium.net.NetError; |
10 | 10 |
11 /** | 11 /** |
12 * Routes notifications from WebContents to AwContentsClient and other listeners
. | 12 * Routes notifications from WebContents to AwContentsClient and other listeners
. |
13 */ | 13 */ |
14 public class AwWebContentsObserver extends WebContentsObserverAndroid { | 14 public class AwWebContentsObserver extends WebContentsObserver { |
15 private final AwContentsClient mAwContentsClient; | 15 private final AwContentsClient mAwContentsClient; |
16 | 16 |
17 public AwWebContentsObserver(WebContents webContents, AwContentsClient awCon
tentsClient) { | 17 public AwWebContentsObserver(WebContents webContents, AwContentsClient awCon
tentsClient) { |
18 super(webContents); | 18 super(webContents); |
19 mAwContentsClient = awContentsClient; | 19 mAwContentsClient = awContentsClient; |
20 } | 20 } |
21 | 21 |
22 @Override | 22 @Override |
23 public void didFinishLoad(long frameId, String validatedUrl, boolean isMainF
rame) { | 23 public void didFinishLoad(long frameId, String validatedUrl, boolean isMainF
rame) { |
24 String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUr
l(); | 24 String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUr
l(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 if (isFragmentNavigation) { | 61 if (isFragmentNavigation) { |
62 mAwContentsClient.onPageFinished(url); | 62 mAwContentsClient.onPageFinished(url); |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 @Override | 66 @Override |
67 public void didNavigateAnyFrame(String url, String baseUrl, boolean isReload
) { | 67 public void didNavigateAnyFrame(String url, String baseUrl, boolean isReload
) { |
68 mAwContentsClient.doUpdateVisitedHistory(url, isReload); | 68 mAwContentsClient.doUpdateVisitedHistory(url, isReload); |
69 } | 69 } |
70 } | 70 } |
OLD | NEW |