From af7a57d40c100e8c29fa6bd758313d0f27d0ac05 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Mon, 9 Aug 2010 18:30:40 +0100 Subject: Merge WebKit at r65072 : Implement DeviceMotionClientAndroid This class acts simply as a proxy to the real or mock client, which is owned by the WebView. DEVICE_ORIENTATION is enabled on Android, so we must implement this client before we pull in http://trac.webkit.org/changeset/64845, which calls DeviceMotionClient::setController() from the Page constructor. Change-Id: I8cf448f26103df3e55098e70eec80d845725761f --- WebKit/android/jni/WebCoreFrameBridge.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'WebKit/android/jni/WebCoreFrameBridge.cpp') diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp index 392f931..10c8439 100644 --- a/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -35,6 +35,7 @@ #include "Chrome.h" #include "ChromeClientAndroid.h" #include "ContextMenuClientAndroid.h" +#include "DeviceMotionClientAndroid.h" #include "DeviceOrientationClientAndroid.h" #include "Document.h" #include "DocumentLoader.h" @@ -879,6 +880,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss // Create a new page ChromeClientAndroid* chromeC = new ChromeClientAndroid; EditorClientAndroid* editorC = new EditorClientAndroid; + DeviceMotionClientAndroid* deviceMotionC = new DeviceMotionClientAndroid; DeviceOrientationClientAndroid* deviceOrientationC = new DeviceOrientationClientAndroid; WebCore::Page::PageClients pageClients; @@ -887,6 +889,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss pageClients.editorClient = editorC; pageClients.dragClient = new DragClientAndroid; pageClients.inspectorClient = new InspectorClientAndroid; + pageClients.deviceMotionClient = deviceMotionC; pageClients.deviceOrientationClient = deviceOrientationC; WebCore::Page* page = new WebCore::Page(pageClients); @@ -926,6 +929,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss // Set the frame to active to turn on keyboard focus. frame->init(); frame->selection()->setFocused(true); + deviceMotionC->setWebViewCore(webViewCore); deviceOrientationC->setWebViewCore(webViewCore); // Allow local access to file:/// and substitute data -- cgit v1.1