summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebCoreFrameBridge.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-09 18:30:40 +0100
committerBen Murdoch <benm@google.com>2010-08-13 12:42:03 +0100
commitaf7a57d40c100e8c29fa6bd758313d0f27d0ac05 (patch)
tree031aa52b5e04aab89b35496ad18e5c925095a8d1 /WebKit/android/jni/WebCoreFrameBridge.cpp
parentf2e30ad8bd8c2964e8c3bf9bd88e86f94d0d0a9b (diff)
downloadexternal_webkit-af7a57d40c100e8c29fa6bd758313d0f27d0ac05.zip
external_webkit-af7a57d40c100e8c29fa6bd758313d0f27d0ac05.tar.gz
external_webkit-af7a57d40c100e8c29fa6bd758313d0f27d0ac05.tar.bz2
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
Diffstat (limited to 'WebKit/android/jni/WebCoreFrameBridge.cpp')
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp4
1 files changed, 4 insertions, 0 deletions
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