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

Unified Diff: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: updateViewRoot, ... 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: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java
index 99b64bc5d6aa2886b4649dfbc3ccb1b1b9d581d0..8460a620e215390dce341d999975776cba6fc837 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java
@@ -28,6 +28,7 @@ import org.chromium.content_public.browser.NavigationController;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.browser.WebContentsObserver;
import org.chromium.ui.base.ViewAndroidDelegate;
+import org.chromium.ui.base.ViewRoot;
import org.chromium.ui.base.WindowAndroid;
/**
@@ -48,6 +49,7 @@ public class CastWindowAndroid extends LinearLayout {
private WebContents mWebContents;
private WebContentsObserver mWebContentsObserver;
private WindowAndroid mWindow;
+ private ViewRoot mViewRoot;
/**
* Constructor for inflating via XML.
@@ -134,9 +136,10 @@ public class CastWindowAndroid extends LinearLayout {
String productVersion) {
Context context = getContext();
mContentViewCore = new ContentViewCore(context, productVersion);
+ mViewRoot = ViewRoot.create(mWindow);
ContentView view = ContentView.createContentView(context, mContentViewCore);
mContentViewCore.initialize(ViewAndroidDelegate.createBasicDelegate(view), view,
- webContents, mWindow);
+ webContents, mViewRoot);
mWebContents = mContentViewCore.getWebContents();
mNavigationController = mWebContents.getNavigationController();
mRenderProcessId = renderProcessId;

Powered by Google App Engine
This is Rietveld 408576698