| 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 static void provideTo(LocalFrame&, WebScreenOrientationClient*); | 39 static void provideTo(LocalFrame&, WebScreenOrientationClient*); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 59 void willDetachFrameHost() override; | 58 void willDetachFrameHost() override; |
| 60 | 59 |
| 61 void notifyDispatcher(); | 60 void notifyDispatcher(); |
| 62 | 61 |
| 63 void updateOrientation(); | 62 void updateOrientation(); |
| 64 | 63 |
| 65 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); | 64 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); |
| 66 | 65 |
| 67 bool isActiveAndVisible() const; | 66 bool isActiveAndVisible() const; |
| 68 | 67 |
| 69 PersistentWillBeMember<ScreenOrientation> m_orientation; | 68 Member<ScreenOrientation> m_orientation; |
| 70 WebScreenOrientationClient* m_client; | 69 WebScreenOrientationClient* m_client; |
| 71 Timer<ScreenOrientationController> m_dispatchEventTimer; | 70 Timer<ScreenOrientationController> m_dispatchEventTimer; |
| 72 }; | 71 }; |
| 73 | 72 |
| 74 } // namespace blink | 73 } // namespace blink |
| 75 | 74 |
| 76 #endif // ScreenOrientationController_h | 75 #endif // ScreenOrientationController_h |
| OLD | NEW |