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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10698046: Implements part of Device Motion in the Renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index d012810b227df50e5157eeb07f9ba5ca6da49175..d4140b2bd91b6d5e3a7a5bb0fe421abd1408ea2d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -59,6 +59,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"
@@ -529,6 +530,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),
@@ -5532,6 +5534,12 @@ WebKit::WebSpeechRecognizer* RenderViewImpl::speechRecognizer() {
return speech_recognition_dispatcher_;
}
+WebKit::WebDeviceMotionClient* RenderViewImpl::deviceMotionClient() {
+ if (!device_motion_dispatcher_)
+ device_motion_dispatcher_ = new DeviceMotionDispatcher(this);
+ return device_motion_dispatcher_;
+}
+
WebKit::WebDeviceOrientationClient* RenderViewImpl::deviceOrientationClient() {
if (!device_orientation_dispatcher_)
device_orientation_dispatcher_ = new DeviceOrientationDispatcher(this);

Powered by Google App Engine
This is Rietveld 408576698