| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ScreenOrientationController_h | 5 #ifndef ScreenOrientationController_h |
| 6 #define ScreenOrientationController_h | 6 #define ScreenOrientationController_h |
| 7 | 7 |
| 8 #include "core/frame/LocalFrameLifecycleObserver.h" | 8 #include "core/frame/LocalFrameLifecycleObserver.h" |
| 9 #include "core/frame/PlatformEventController.h" | 9 #include "core/frame/PlatformEventController.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| 11 #include "platform/Supplementable.h" | 11 #include "platform/Supplementable.h" |
| 12 #include "platform/Timer.h" | 12 #include "platform/Timer.h" |
| 13 #include "public/platform/modules/screen_orientation/WebLockOrientationCallback.
h" | 13 #include "public/platform/modules/screen_orientation/WebLockOrientationCallback.
h" |
| 14 #include "public/platform/modules/screen_orientation/WebScreenOrientationLockTyp
e.h" | 14 #include "public/platform/modules/screen_orientation/WebScreenOrientationLockTyp
e.h" |
| 15 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h" | 15 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 class FrameView; | 19 class FrameView; |
| 20 class ScreenOrientation; | 20 class ScreenOrientation; |
| 21 class WebScreenOrientationClient; | 21 class WebScreenOrientationClient; |
| 22 | 22 |
| 23 class MODULES_EXPORT ScreenOrientationController final | 23 class MODULES_EXPORT ScreenOrientationController final |
| 24 : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController> | 24 : public GarbageCollectedFinalized<ScreenOrientationController> |
| 25 , public WillBeHeapSupplement<LocalFrame> | 25 , public HeapSupplement<LocalFrame> |
| 26 , public LocalFrameLifecycleObserver | 26 , public LocalFrameLifecycleObserver |
| 27 , public PlatformEventController { | 27 , public PlatformEventController { |
| 28 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController); | 28 USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController); |
| 29 WTF_MAKE_NONCOPYABLE(ScreenOrientationController); | 29 WTF_MAKE_NONCOPYABLE(ScreenOrientationController); |
| 30 USING_FAST_MALLOC_WILL_BE_REMOVED(ScreenOrientationController); | |
| 31 public: | 30 public: |
| 32 ~ScreenOrientationController() override; | 31 ~ScreenOrientationController() override; |
| 33 | 32 |
| 34 void setOrientation(ScreenOrientation*); | 33 void setOrientation(ScreenOrientation*); |
| 35 void notifyOrientationChanged(); | 34 void notifyOrientationChanged(); |
| 36 | 35 |
| 37 void lock(WebScreenOrientationLockType, WebLockOrientationCallback*); | 36 void lock(WebScreenOrientationLockType, WebLockOrientationCallback*); |
| 38 void unlock(); | 37 void unlock(); |
| 39 | 38 |
| 40 void setOverride(WebScreenOrientationType, unsigned short angle); | 39 void setOverride(WebScreenOrientationType, unsigned short angle); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 65 WebScreenOrientationType effectiveType(ChromeClient&); | 64 WebScreenOrientationType effectiveType(ChromeClient&); |
| 66 | 65 |
| 67 void notifyDispatcher(); | 66 void notifyDispatcher(); |
| 68 | 67 |
| 69 void updateOrientation(); | 68 void updateOrientation(); |
| 70 | 69 |
| 71 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); | 70 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); |
| 72 | 71 |
| 73 bool isActiveAndVisible() const; | 72 bool isActiveAndVisible() const; |
| 74 | 73 |
| 75 PersistentWillBeMember<ScreenOrientation> m_orientation; | 74 Member<ScreenOrientation> m_orientation; |
| 76 WebScreenOrientationClient* m_client; | 75 WebScreenOrientationClient* m_client; |
| 77 Timer<ScreenOrientationController> m_dispatchEventTimer; | 76 Timer<ScreenOrientationController> m_dispatchEventTimer; |
| 78 bool m_override; | 77 bool m_override; |
| 79 WebScreenOrientationType m_overrideType; | 78 WebScreenOrientationType m_overrideType; |
| 80 unsigned short m_overrideAngle; | 79 unsigned short m_overrideAngle; |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace blink | 82 } // namespace blink |
| 84 | 83 |
| 85 #endif // ScreenOrientationController_h | 84 #endif // ScreenOrientationController_h |
| OLD | NEW |