Index: content/renderer/renderer_webkitplatformsupport_impl.cc |
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc |
index 917ce1f50047d0235af77bfde0e6216ed7c1d73b..d15b530b512584d75fc8258f8a5d749671c80e3a 100644 |
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc |
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc |
@@ -32,6 +32,7 @@ |
#include "content/public/common/webplugininfo.h" |
#include "content/public/renderer/content_renderer_client.h" |
#include "content/renderer/device_orientation/device_motion_event_pump.h" |
+#include "content/renderer/device_orientation/device_orientation_event_pump.h" |
#include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
#include "content/renderer/gamepad_shared_memory_reader.h" |
#include "content/renderer/hyphenator/hyphenator.h" |
@@ -55,6 +56,7 @@ |
#include "net/base/net_util.h" |
#include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
#include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" |
+#include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" |
#include "third_party/WebKit/public/platform/WebFileInfo.h" |
#include "third_party/WebKit/public/platform/WebGamepads.h" |
#include "third_party/WebKit/public/platform/WebHyphenator.h" |
@@ -1108,6 +1110,17 @@ void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( |
//------------------------------------------------------------------------------ |
+void RendererWebKitPlatformSupportImpl::setDeviceOrientationListener( |
+ WebKit::WebDeviceOrientationListener* listener) { |
+ if (!device_orientation_event_pump_) { |
+ device_orientation_event_pump_.reset(new DeviceOrientationEventPump); |
+ device_orientation_event_pump_->Attach(RenderThreadImpl::current()); |
+ } |
+ device_orientation_event_pump_->SetListener(listener); |
+} |
+ |
+//------------------------------------------------------------------------------ |
+ |
WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
// Use a mock implementation for testing in-progress work. |
WebKit::WebCrypto* crypto = |