Index: content/renderer/renderer_webkitplatformsupport_impl.cc |
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc |
index 09ceac16ce4770b9a7755f6dac0aa175e8dfa932..796cb34a0340e19796b50455b2f0b881ebf42e40 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/media/audio_decoder.h" |
@@ -54,6 +55,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/WebMediaStreamCenter.h" |
@@ -1043,6 +1045,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 = |