| 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 27eb4f4671caab62bf63eaf8954ffd387a94503e..e7cbc30895ece15dea16e1e05d9dff3b35e9124e 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| @@ -76,6 +76,7 @@ import org.chromium.content_public.common.Referrer;
|
| import org.chromium.net.NetError;
|
| import org.chromium.net.NetworkChangeNotifier;
|
| import org.chromium.ui.base.ActivityWindowAndroid;
|
| +import org.chromium.ui.base.EventHandler;
|
| import org.chromium.ui.base.PageTransition;
|
| import org.chromium.ui.base.ViewAndroidDelegate;
|
| import org.chromium.ui.base.WindowAndroid;
|
| @@ -362,6 +363,8 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
|
|
|
| private static String sCurrentLocales = "";
|
|
|
| + private EventHandler mEventHandler;
|
| +
|
| private static final class AwContentsDestroyRunnable implements Runnable {
|
| private final long mNativeAwContents;
|
| // Hold onto a reference to the window (via its wrapper), so that it is not destroyed
|
| @@ -3219,7 +3222,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);
|
| - mContentViewCore.onPhysicalBackingSizeChanged(w, h);
|
| + getEventHandler().onPhysicalBackingSizeChanged(w, h);
|
| mContentViewCore.onSizeChanged(w, h, ow, oh);
|
| nativeOnSizeChanged(mNativeAwContents, w, h, ow, oh);
|
| }
|
| @@ -3295,6 +3298,13 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
|
| }
|
| }
|
|
|
| + private EventHandler getEventHandler() {
|
| + if (mEventHandler == null) {
|
| + mEventHandler = new EventHandler(nativeGetNativeView(mNativeAwContents));
|
| + }
|
| + return mEventHandler;
|
| + }
|
| +
|
| // Return true if the GeolocationPermissionAPI should be used.
|
| @CalledByNative
|
| private boolean useLegacyGeolocationPermissionAPI() {
|
| @@ -3398,4 +3408,5 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
|
|
|
| private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwContents);
|
| private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAwContents);
|
| + private native long nativeGetNativeView(long nativeAwContents);
|
| }
|
|
|