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

Unified Diff: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h

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/DeviceOrientationDispatcher.h
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h
index 1a0322a053d075fa8a4489ae09fc1c31f9a91689..a994fba431498e5a8cc3454711504aec987362f3 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h
@@ -33,6 +33,7 @@
#include "core/frame/PlatformEventDispatcher.h"
#include "platform/heap/Handle.h"
+#include "public/platform/WebPlatformEventType.h"
#include "public/platform/modules/device_orientation/WebDeviceOrientationListener.h"
#include "wtf/RefPtr.h"
@@ -45,7 +46,7 @@ class WebDeviceOrientationData;
class DeviceOrientationDispatcher final : public GarbageCollectedFinalized<DeviceOrientationDispatcher>, public PlatformEventDispatcher, public WebDeviceOrientationListener {
USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationDispatcher);
public:
- static DeviceOrientationDispatcher& instance();
+ static DeviceOrientationDispatcher& instance(bool absolute);
~DeviceOrientationDispatcher() override;
// Note that the returned object is owned by this class.
@@ -58,12 +59,15 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
- DeviceOrientationDispatcher();
+ explicit DeviceOrientationDispatcher(bool absolute);
// Inherited from PlatformEventDispatcher.
void startListening() override;
void stopListening() override;
+ WebPlatformEventType getWebPlatformEventType() const;
+
+ const bool m_absolute;
Member<DeviceOrientationData> m_lastDeviceOrientationData;
};

Powered by Google App Engine
This is Rietveld 408576698