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

Unified Diff: Source/modules/device_orientation/DeviceMotionDispatcher.cpp

Issue 417213002: Introduce PlatformEvent to handle Device events, Battery events and Gamepad events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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
Index: Source/modules/device_orientation/DeviceMotionDispatcher.cpp
diff --git a/Source/modules/device_orientation/DeviceMotionDispatcher.cpp b/Source/modules/device_orientation/DeviceMotionDispatcher.cpp
index 0569fd34c503e8f1cbeb674b6e770390e7ea5e9d..21d72f821416c1f0be2b769bb18d585432e8ef6e 100644
--- a/Source/modules/device_orientation/DeviceMotionDispatcher.cpp
+++ b/Source/modules/device_orientation/DeviceMotionDispatcher.cpp
@@ -53,12 +53,12 @@ DeviceMotionDispatcher::~DeviceMotionDispatcher()
void DeviceMotionDispatcher::startListening()
{
- blink::Platform::current()->setDeviceMotionListener(this);
+ blink::Platform::current()->startListening(WebPlatformEventDeviceMotion, this);
}
void DeviceMotionDispatcher::stopListening()
{
- blink::Platform::current()->setDeviceMotionListener(0);
+ blink::Platform::current()->stopListening(WebPlatformEventDeviceMotion);
m_lastDeviceMotionData.clear();
}

Powered by Google App Engine
This is Rietveld 408576698