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

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

Issue 2688113002: Make ViewRoot the top of the ViewAndroid tree (Closed)
Patch Set: comments 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 6215bf40ac63039f7b4018d7e9163cb88148ca28..22a8874f8aefe88dee2cde2ccb145900cf35c5bb 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,7 @@ 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.WindowAndroid;
+import org.chromium.ui.base.ViewRoot;
/**
* Container for the various UI components that make up a shell window.
@@ -66,7 +66,7 @@ public class Shell extends LinearLayout {
private long mNativeShell;
private ContentViewRenderView mContentViewRenderView;
- private WindowAndroid mWindow;
+ private ViewRoot mViewRoot;
private ShellViewAndroidDelegate mViewAndroidDelegate;
private boolean mLoading;
@@ -101,13 +101,13 @@ public class Shell extends LinearLayout {
* Initializes the Shell for use.
*
* @param nativeShell The pointer to the native Shell object.
- * @param window The owning window for this shell.
+ * @param viewRoot {@link ViewRoot} used to forward events to native.
* @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, ContentViewClient client) {
+ public void initialize(long nativeShell, ViewRoot viewRoot, ContentViewClient client) {
mNativeShell = nativeShell;
- mWindow = window;
+ mViewRoot = viewRoot;
mContentViewClient = client;
}
@@ -122,7 +122,6 @@ public class Shell extends LinearLayout {
@CalledByNative
private void onNativeDestroyed() {
- mWindow = null;
mNativeShell = 0;
mContentViewCore.destroy();
}
@@ -301,7 +300,7 @@ public class Shell extends LinearLayout {
mContentViewCore = new ContentViewCore(context, "");
ContentView cv = ContentView.createContentView(context, mContentViewCore);
mViewAndroidDelegate = new ShellViewAndroidDelegate(cv);
- mContentViewCore.initialize(mViewAndroidDelegate, cv, webContents, mWindow);
+ mContentViewCore.initialize(mViewAndroidDelegate, cv, webContents, mViewRoot);
mContentViewCore.setActionModeCallback(defaultActionCallback());
mContentViewCore.setContentViewClient(mContentViewClient);
mWebContents = mContentViewCore.getWebContents();

Powered by Google App Engine
This is Rietveld 408576698