Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3059)

Unified Diff: content/renderer/render_view_impl.cc

Issue 10827415: Chromium-side implementation of DeviceMotion. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test should set the kEnableDeviceMotion flag Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index daf58486c6501a8c3c1c1b2194342698377f3a49..48a7b5e13d92999360df69b3d92eecb9a6062b72 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -62,6 +62,7 @@
#include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
#include "content/renderer/browser_plugin/old/browser_plugin_constants.h"
#include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"
+#include "content/renderer/device_motion_dispatcher.h"
#include "content/renderer/device_orientation_dispatcher.h"
#include "content/renderer/devtools_agent.h"
#include "content/renderer/dom_automation_controller.h"
@@ -541,6 +542,7 @@ RenderViewImpl::RenderViewImpl(
geolocation_dispatcher_(NULL),
input_tag_speech_dispatcher_(NULL),
speech_recognition_dispatcher_(NULL),
+ device_motion_dispatcher_(NULL),
device_orientation_dispatcher_(NULL),
media_stream_dispatcher_(NULL),
media_stream_impl_(NULL),
@@ -759,6 +761,12 @@ RenderViewImpl* RenderViewImpl::Create(
accessibility_mode);
}
+WebKit::WebDeviceMotionDetector* RenderViewImpl::GetDeviceMotionDispatcher() {
+ if (!device_motion_dispatcher_)
+ device_motion_dispatcher_ = new DeviceMotionDispatcher(this);
+ return device_motion_dispatcher_;
+}
+
WebPeerConnection00Handler* RenderViewImpl::CreatePeerConnectionHandlerJsep(
WebPeerConnection00HandlerClient* client) {
EnsureMediaStreamImpl();
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698