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

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

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: unittest Created 3 years, 11 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..56ca5588d9e223190dc4788fab9459f4b861d1cc 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
@@ -37,7 +37,7 @@ 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;
+import org.chromium.ui.base.ViewRoot;
/**
* Container for the various UI components that make up a shell window.
@@ -67,7 +67,7 @@ public class Shell extends LinearLayout {
private long mNativeShell;
private ContentViewRenderView mContentViewRenderView;
- private WindowAndroid mWindow;
+ private ViewRoot mViewRoot;
private boolean mLoading;
private boolean mIsFullscreen;
@@ -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();
}
@@ -297,7 +296,7 @@ public class Shell extends LinearLayout {
mContentViewCore = new ContentViewCore(context, "");
ContentView cv = ContentView.createContentView(context, mContentViewCore);
mContentViewCore.initialize(ViewAndroidDelegate.createBasicDelegate(cv), cv,
- webContents, mWindow);
+ webContents, mViewRoot);
mContentViewCore.setActionModeCallback(defaultActionCallback());
mContentViewCore.setContentViewClient(mContentViewClient);
mWebContents = mContentViewCore.getWebContents();

Powered by Google App Engine
This is Rietveld 408576698