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

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

Issue 2708703004: Reland "Refactor ContentViewClient (4/6)" (Closed)
Patch Set: rebased Created 3 years, 10 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 e2f82e34584bb68430d33a6a1396760ae116293b..6215bf40ac63039f7b4018d7e9163cb88148ca28 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
@@ -36,7 +36,6 @@ import org.chromium.content_public.browser.ActionModeCallbackHelper;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.NavigationController;
import org.chromium.content_public.browser.WebContents;
-import org.chromium.ui.base.ViewAndroidDelegate;
import org.chromium.ui.base.WindowAndroid;
/**
@@ -68,6 +67,7 @@ public class Shell extends LinearLayout {
private long mNativeShell;
private ContentViewRenderView mContentViewRenderView;
private WindowAndroid mWindow;
+ private ShellViewAndroidDelegate mViewAndroidDelegate;
private boolean mLoading;
private boolean mIsFullscreen;
@@ -286,6 +286,10 @@ public class Shell extends LinearLayout {
}
}
+ public ShellViewAndroidDelegate getViewAndroidDelegate() {
+ return mViewAndroidDelegate;
+ }
+
/**
* Initializes the ContentView based on the native tab contents pointer passed in.
* @param webContents A {@link WebContents} object.
@@ -296,8 +300,8 @@ public class Shell extends LinearLayout {
Context context = getContext();
mContentViewCore = new ContentViewCore(context, "");
ContentView cv = ContentView.createContentView(context, mContentViewCore);
- mContentViewCore.initialize(ViewAndroidDelegate.createBasicDelegate(cv), cv,
- webContents, mWindow);
+ mViewAndroidDelegate = new ShellViewAndroidDelegate(cv);
+ mContentViewCore.initialize(mViewAndroidDelegate, cv, webContents, mWindow);
mContentViewCore.setActionModeCallback(defaultActionCallback());
mContentViewCore.setContentViewClient(mContentViewClient);
mWebContents = mContentViewCore.getWebContents();

Powered by Google App Engine
This is Rietveld 408576698