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/FrameDestructionObserver.h" | 8 #include "core/frame/FrameDestructionObserver.h" |
9 #include "core/frame/PlatformEventController.h" | 9 #include "core/frame/PlatformEventController.h" |
10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 explicit ScreenOrientationController(LocalFrame&, WebScreenOrientationClient
*); | 45 explicit ScreenOrientationController(LocalFrame&, WebScreenOrientationClient
*); |
46 static WebScreenOrientationType computeOrientation(FrameView*); | 46 static WebScreenOrientationType computeOrientation(FrameView*); |
47 | 47 |
48 // Inherited from PlatformEventController. | 48 // Inherited from PlatformEventController. |
49 virtual void didUpdateData() override; | 49 virtual void didUpdateData() override; |
50 virtual void registerWithDispatcher() override; | 50 virtual void registerWithDispatcher() override; |
51 virtual void unregisterWithDispatcher() override; | 51 virtual void unregisterWithDispatcher() override; |
52 virtual bool hasLastData() override; | 52 virtual bool hasLastData() override; |
53 virtual void pageVisibilityChanged() override; | 53 virtual void pageVisibilityChanged() override; |
54 | 54 |
| 55 // Inherited from FrameDestructionObserver. |
| 56 virtual void willDetachFrameHost() override; |
| 57 |
55 void notifyDispatcher(); | 58 void notifyDispatcher(); |
56 | 59 |
57 void updateOrientation(); | 60 void updateOrientation(); |
58 | 61 |
59 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); | 62 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); |
60 | 63 |
61 bool isActiveAndVisible() const; | 64 bool isActiveAndVisible() const; |
62 | 65 |
63 PersistentWillBeMember<ScreenOrientation> m_orientation; | 66 PersistentWillBeMember<ScreenOrientation> m_orientation; |
64 WebScreenOrientationClient* m_client; | 67 WebScreenOrientationClient* m_client; |
65 Timer<ScreenOrientationController> m_dispatchEventTimer; | 68 Timer<ScreenOrientationController> m_dispatchEventTimer; |
66 }; | 69 }; |
67 | 70 |
68 } // namespace blink | 71 } // namespace blink |
69 | 72 |
70 #endif // ScreenOrientationController_h | 73 #endif // ScreenOrientationController_h |
OLD | NEW |