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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContentsClient.java

Issue 10969071: [Android] Install a WebContentsObserverAndroid in android_webview. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add assert Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698