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

Unified Diff: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp

Issue 1416123002: Absolute Device Orientation API: blink implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
index cf71466a1d0058d4a7c042cd013b65293ade12ee..9fe1ec97b472b600a8eca5e5294b46603d04d4c2 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
@@ -77,7 +77,7 @@ void DeviceOrientationController::didAddEventListener(LocalDOMWindow* window, co
DeviceOrientationData* DeviceOrientationController::lastData() const
{
- return m_overrideOrientationData ? m_overrideOrientationData.get() : DeviceOrientationDispatcher::instance().latestDeviceOrientationData();
+ return m_overrideOrientationData ? m_overrideOrientationData.get() : dispatcherInstance().latestDeviceOrientationData();
}
bool DeviceOrientationController::hasLastData()
@@ -87,12 +87,12 @@ bool DeviceOrientationController::hasLastData()
void DeviceOrientationController::registerWithDispatcher()
{
- DeviceOrientationDispatcher::instance().addController(this);
+ dispatcherInstance().addController(this);
}
void DeviceOrientationController::unregisterWithDispatcher()
{
- DeviceOrientationDispatcher::instance().removeController(this);
+ dispatcherInstance().removeController(this);
}
PassRefPtrWillBeRawPtr<Event> DeviceOrientationController::lastEvent() const
@@ -127,6 +127,11 @@ void DeviceOrientationController::clearOverride()
didUpdateData();
}
+DeviceOrientationDispatcher& DeviceOrientationController::dispatcherInstance() const
+{
+ return DeviceOrientationDispatcher::instance(false);
+}
+
DEFINE_TRACE(DeviceOrientationController)
{
visitor->trace(m_overrideOrientationData);

Powered by Google App Engine
This is Rietveld 408576698