Index: content/shell/android/java/src/org/chromium/content_shell/Shell.java |
diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java |
index fb232075ac4e45ce1a4e0d821704766d7dadadd8..f2afcfbd240c8d51a7d5d9764815c9022a410725 100644 |
--- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java |
+++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java |
@@ -29,6 +29,7 @@ import org.chromium.base.annotations.JNINamespace; |
import org.chromium.content.browser.ActivityContentVideoViewEmbedder; |
import org.chromium.content.browser.ContentVideoViewEmbedder; |
import org.chromium.content.browser.ContentView; |
+import org.chromium.content.browser.ContentViewClient; |
import org.chromium.content.browser.ContentViewCore; |
import org.chromium.content.browser.ContentViewRenderView; |
import org.chromium.content_public.browser.ActionModeCallbackHelper; |
@@ -55,6 +56,7 @@ public class Shell extends LinearLayout { |
private ContentViewCore mContentViewCore; |
private WebContents mWebContents; |
private NavigationController mNavigationController; |
+ private ContentViewClient mContentViewClient; |
private EditText mUrlTextView; |
private ImageButton mPrevButton; |
private ImageButton mNextButton; |
@@ -100,10 +102,13 @@ public class Shell extends LinearLayout { |
* |
* @param nativeShell The pointer to the native Shell object. |
* @param window The owning window for this shell. |
+ * @param client The {@link ContentViewClient} to be bound to any current or new |
+ * {@link ContentViewCore}s associated with this shell. |
*/ |
- public void initialize(long nativeShell, WindowAndroid window) { |
+ public void initialize(long nativeShell, WindowAndroid window, ContentViewClient client) { |
mNativeShell = nativeShell; |
mWindow = window; |
+ mContentViewClient = client; |
} |
/** |
@@ -298,6 +303,7 @@ public class Shell extends LinearLayout { |
mViewAndroidDelegate = new ShellViewAndroidDelegate(cv); |
mContentViewCore.initialize(mViewAndroidDelegate, cv, webContents, mWindow); |
mContentViewCore.setActionModeCallback(defaultActionCallback()); |
+ mContentViewCore.setContentViewClient(mContentViewClient); |
mWebContents = mContentViewCore.getWebContents(); |
mNavigationController = mWebContents.getNavigationController(); |
if (getParent() != null) mContentViewCore.onShow(); |