summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorbenm@chromium.org <benm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 21:36:52 +0000
committerbenm@chromium.org <benm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 21:36:52 +0000
commitff7f8977cb21098f728b5e3cbeeb102c36593394 (patch)
tree5c4ea94c316efb835f9f9039dbe85e781a94e598 /android_webview
parentd89f186e5e99a2ed42d951b3e4e4875d3d2f2b6e (diff)
downloadchromium_src-ff7f8977cb21098f728b5e3cbeeb102c36593394.zip
chromium_src-ff7f8977cb21098f728b5e3cbeeb102c36593394.tar.gz
chromium_src-ff7f8977cb21098f728b5e3cbeeb102c36593394.tar.bz2
[Android WebView] Fix assertion failure in WindowAndroid.
Ensure that AwContents is meeting the expectations of WindowAndroid and provides it an ApplicationContext. Additionally, fix indentation in AwContents. Review URL: https://codereview.chromium.org/88683003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/java/src/org/chromium/android_webview/AwContents.java23
1 files changed, 12 insertions, 11 deletions
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 edc2347..fabb027 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -543,18 +543,19 @@ public class AwContents {
ContentViewCore.GestureStateListener pinchGestureStateListener,
ContentViewClient contentViewClient,
ContentViewCore.ZoomControlsDelegate zoomControlsDelegate) {
- Context context = containerView.getContext();
- ContentViewCore contentViewCore = new ContentViewCore(context);
- // Note INPUT_EVENTS_DELIVERED_IMMEDIATELY is passed to avoid triggering vsync in the
- // compositor, not because input events are delivered immediately.
- contentViewCore.initialize(containerView, internalDispatcher, nativeWebContents,
- context instanceof Activity ?
- new ActivityWindowAndroid((Activity) context) : new WindowAndroid(context),
+ Context context = containerView.getContext();
+ ContentViewCore contentViewCore = new ContentViewCore(context);
+ // Note INPUT_EVENTS_DELIVERED_IMMEDIATELY is passed to avoid triggering vsync in the
+ // compositor, not because input events are delivered immediately.
+ contentViewCore.initialize(containerView, internalDispatcher, nativeWebContents,
+ context instanceof Activity ?
+ new ActivityWindowAndroid((Activity) context) :
+ new WindowAndroid(context.getApplicationContext()),
ContentViewCore.INPUT_EVENTS_DELIVERED_IMMEDIATELY);
- contentViewCore.setGestureStateListener(pinchGestureStateListener);
- contentViewCore.setContentViewClient(contentViewClient);
- contentViewCore.setZoomControlsDelegate(zoomControlsDelegate);
- return contentViewCore;
+ contentViewCore.setGestureStateListener(pinchGestureStateListener);
+ contentViewCore.setContentViewClient(contentViewClient);
+ contentViewCore.setZoomControlsDelegate(zoomControlsDelegate);
+ return contentViewCore;
}
/**