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 "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
11 #include "platform/Timer.h" | |
12 #include "public/platform/WebLockOrientationCallback.h" | 11 #include "public/platform/WebLockOrientationCallback.h" |
13 #include "public/platform/WebScreenOrientationLockType.h" | 12 #include "public/platform/WebScreenOrientationLockType.h" |
14 #include "public/platform/WebScreenOrientationType.h" | 13 #include "public/platform/WebScreenOrientationType.h" |
15 | 14 |
16 namespace blink { | 15 namespace blink { |
17 | 16 |
18 class FrameView; | 17 class FrameView; |
19 class ScreenOrientation; | 18 class ScreenOrientation; |
20 class WebScreenOrientationClient; | 19 class WebScreenOrientationClient; |
21 | 20 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 virtual bool hasLastData() override; | 52 virtual bool hasLastData() override; |
54 virtual void pageVisibilityChanged() override; | 53 virtual void pageVisibilityChanged() override; |
55 | 54 |
56 // Inherited from LocalFrameLifecycleObserver. | 55 // Inherited from LocalFrameLifecycleObserver. |
57 virtual void willDetachFrameHost() override; | 56 virtual void willDetachFrameHost() override; |
58 | 57 |
59 void notifyDispatcher(); | 58 void notifyDispatcher(); |
60 | 59 |
61 void updateOrientation(); | 60 void updateOrientation(); |
62 | 61 |
63 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); | 62 void dispatchChangeEvent(); |
64 | 63 |
65 bool isActiveAndVisible() const; | 64 bool isActiveAndVisible() const; |
66 | 65 |
67 PersistentWillBeMember<ScreenOrientation> m_orientation; | 66 PersistentWillBeMember<ScreenOrientation> m_orientation; |
68 WebScreenOrientationClient* m_client; | 67 WebScreenOrientationClient* m_client; |
69 Timer<ScreenOrientationController> m_dispatchEventTimer; | 68 bool m_isDispatchingEvent; |
70 }; | 69 }; |
71 | 70 |
72 } // namespace blink | 71 } // namespace blink |
73 | 72 |
74 #endif // ScreenOrientationController_h | 73 #endif // ScreenOrientationController_h |
OLD | NEW |