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

Unified Diff: Source/modules/device_orientation/DeviceOrientationDispatcher.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/DeviceOrientationDispatcher.cpp
diff --git a/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp b/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
index 68050dc59eb67f0d8101c05459b643d1658777af..9896ea31022d6f082718bc875ee492a5bfa3ab9e 100644
--- a/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
+++ b/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
@@ -53,12 +53,12 @@ DeviceOrientationDispatcher::~DeviceOrientationDispatcher()
void DeviceOrientationDispatcher::startListening()
{
- blink::Platform::current()->setDeviceOrientationListener(this);
+ blink::Platform::current()->startListening(WebPlatformEventDeviceOrientation, this);
}
void DeviceOrientationDispatcher::stopListening()
{
- blink::Platform::current()->setDeviceOrientationListener(0);
+ blink::Platform::current()->stopListening(WebPlatformEventDeviceOrientation);
m_lastDeviceOrientationData.clear();
}
« no previous file with comments | « Source/modules/device_orientation/DeviceOrientationDispatcher.h ('k') | Source/modules/gamepad/GamepadDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698