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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.java

Issue 2827263006: Revert "Refactor ContentViewClient (6/6)" (Closed)
Patch Set: Revert "Let ImeAdapterAndroid have the same lifecycle as its Java peer" Created 3 years, 8 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
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();

Powered by Google App Engine
This is Rietveld 408576698