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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: tests Created 3 years, 12 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: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index f868572acdf78ff9beea53b8581a82c4d16136e4..8ea63cda4db07f4ff829d6f7ad7f7a53792cae5f 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -1063,6 +1063,8 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
mIoThreadClient, mInterceptNavigationDelegate);
mWebContents = mContentViewCore.getWebContents();
mNavigationController = mWebContents.getNavigationController();
+ mViewRoot = ViewRoot.create(mWindowAndroid.getWindowAndroid());
+ mWebContents.initViewRoot(mViewRoot);
installWebContentsObserver();
mSettings.setWebContents(webContents);
@@ -3209,7 +3211,7 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
// to enter fixedLayoutSize mode is sent before the first resize
// update.
mLayoutSizer.onSizeChanged(w, h, ow, oh);
- getViewRoot().onPhysicalBackingSizeChanged(w, h);
+ mViewRoot.onPhysicalBackingSizeChanged(w, h);
mContentViewCore.onSizeChanged(w, h, ow, oh);
nativeOnSizeChanged(mNativeAwContents, w, h, ow, oh);
}
@@ -3285,13 +3287,6 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
}
}
- private ViewRoot getViewRoot() {
- if (mViewRoot == null) {
- mViewRoot = nativeGetViewRoot(mNativeAwContents);
- }
- return mViewRoot;
- }
-
// Return true if the GeolocationPermissionAPI should be used.
@CalledByNative
private boolean useLegacyGeolocationPermissionAPI() {
@@ -3395,5 +3390,4 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwContents);
private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAwContents);
- private native ViewRoot nativeGetViewRoot(long nativeAwContents);
}

Powered by Google App Engine
This is Rietveld 408576698