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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 14678012: Implement the content/renderer and content/browser part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index fa10df6407c652b0b04392097698a1161857ddc9..abef23eae01bb68f74e6375ec63c1746acaddc8c 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -27,6 +27,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/gpu_info.h"
#include "content/public/renderer/content_renderer_client.h"
+#include "content/renderer/device_motion_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"
@@ -40,6 +41,7 @@
#include "media/audio/audio_output_device.h"
#include "media/base/audio_hardware_config.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebBlobRegistry.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebDeviceMotionHandler.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileInfo.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGamepads.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebHyphenator.h"
@@ -895,5 +897,14 @@ GrContext* RendererWebKitPlatformSupportImpl::sharedOffscreenGrContext() {
return shared_offscreen_context_->GrContext();
}
+//------------------------------------------------------------------------------
+
+WebKit::WebDeviceMotionHandler*
+RendererWebKitPlatformSupportImpl::deviceMotionHandler() {
+ if (!device_motion_event_pump_.get())
jamesr 2013/05/16 19:53:06 just if (!device_motion_event_pump_) ...
timvolodine 2013/05/20 18:18:48 Done.
+ device_motion_event_pump_.reset(new DeviceMotionEventPump);
+ return device_motion_event_pump_.get();
+}
} // namespace content
+

Powered by Google App Engine
This is Rietveld 408576698