Index: android_webview/java/src/org/chromium/android_webview/AwContentsClient.java |
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java |
index e239b3f2fbad505f76f17d435ced4164db40992a..9f971e291e3511325e2a923291d74a124531171a 100644 |
--- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java |
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java |
@@ -30,6 +30,8 @@ public abstract class AwContentsClient extends ContentViewClient { |
private final WebContentsDelegateAdapter mWebContentsDelegateAdapter = |
new WebContentsDelegateAdapter(); |
+ private AwWebContentsObserver mWebContentsObserver; |
+ |
//-------------------------------------------------------------------------------------------- |
// Adapter for WebContentsDelegate methods. |
//-------------------------------------------------------------------------------------------- |
@@ -104,8 +106,8 @@ public abstract class AwContentsClient extends ContentViewClient { |
} |
} |
- class WebContentsObserverAdapter extends WebContentsObserverAndroid { |
- public WebContentsObserverAdapter(ContentViewCore contentViewCore) { |
+ class AwWebContentsObserver extends WebContentsObserverAndroid { |
+ public AwWebContentsObserver(ContentViewCore contentViewCore) { |
super(contentViewCore); |
} |
@@ -127,6 +129,11 @@ public abstract class AwContentsClient extends ContentViewClient { |
} |
} |
+ void installWebContentsObserver(ContentViewCore contentViewCore) { |
+ assert mWebContentsObserver == null; |
+ mWebContentsObserver = new AwWebContentsObserver(contentViewCore); |
+ } |
+ |
final AwWebContentsDelegate getWebContentsDelegate() { |
return mWebContentsDelegateAdapter; |
} |