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

Side by Side Diff: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationAbsoluteController.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, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DeviceOrientationController_h 5 #ifndef DeviceOrientationAbsoluteController_h
6 #define DeviceOrientationController_h 6 #define DeviceOrientationAbsoluteController_h
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/DeviceSingleWindowEventController.h" 9 #include "core/frame/DeviceSingleWindowEventController.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class DeviceOrientationData; 14 class DeviceOrientationData;
15 class Event; 15 class Event;
16 16
17 class MODULES_EXPORT DeviceOrientationController final : public DeviceSingleWind owEventController, public WillBeHeapSupplement<Document> { 17 class MODULES_EXPORT DeviceOrientationAbsoluteController final : public DeviceSi ngleWindowEventController, public WillBeHeapSupplement<Document> {
18 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationController); 18 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationAbsoluteController);
19 public: 19 public:
20 ~DeviceOrientationController() override; 20 ~DeviceOrientationAbsoluteController() override;
21 21
22 static const char* supplementName(); 22 static const char* supplementName();
23 static DeviceOrientationController& from(Document&); 23 static DeviceOrientationAbsoluteController& from(Document&);
24 24
25 // Inherited from DeviceSingleWindowEventController. 25 // Inherited from DeviceSingleWindowEventController.
26 void didUpdateData() override; 26 void didUpdateData() override;
27 void didAddEventListener(LocalDOMWindow*, const AtomicString& eventType) ove rride; 27 void didAddEventListener(LocalDOMWindow*, const AtomicString& eventType) ove rride;
28 28
29 void setOverride(DeviceOrientationData*); 29 void setOverride(DeviceOrientationData*);
30 void clearOverride(); 30 void clearOverride();
31 31
32 DECLARE_VIRTUAL_TRACE(); 32 DECLARE_VIRTUAL_TRACE();
33 33
34 private: 34 private:
35 explicit DeviceOrientationController(Document&); 35 explicit DeviceOrientationAbsoluteController(Document&);
36 36
37 // Inherited from DeviceEventControllerBase. 37 // Inherited from DeviceEventControllerBase.
38 void registerWithDispatcher() override; 38 void registerWithDispatcher() override;
39 void unregisterWithDispatcher() override; 39 void unregisterWithDispatcher() override;
40 bool hasLastData() override; 40 bool hasLastData() override;
41 41
42 // Inherited from DeviceSingleWindowEventController. 42 // Inherited from DeviceSingleWindowEventController.
43 PassRefPtrWillBeRawPtr<Event> lastEvent() const override; 43 PassRefPtrWillBeRawPtr<Event> lastEvent() const override;
44 const AtomicString& eventTypeName() const override; 44 const AtomicString& eventTypeName() const override;
45 bool isNullEvent(Event*) const override; 45 bool isNullEvent(Event*) const override;
46 46
47 DeviceOrientationData* lastData() const; 47 DeviceOrientationData* lastData() const;
48 48
49 PersistentWillBeMember<DeviceOrientationData> m_overrideOrientationData; 49 PersistentWillBeMember<DeviceOrientationData> m_overrideOrientationData;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif // DeviceOrientationController_h 54 #endif // DeviceOrientationAbsoluteController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698