| 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 ScreenOrientationControllerImpl_h | 5 #ifndef ScreenOrientationControllerImpl_h |
| 6 #define ScreenOrientationControllerImpl_h | 6 #define ScreenOrientationControllerImpl_h |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/frame/PlatformEventController.h" | 9 #include "core/frame/PlatformEventController.h" |
| 10 #include "core/frame/ScreenOrientationController.h" | 10 #include "core/frame/ScreenOrientationController.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 private: | 47 private: |
| 48 ScreenOrientationControllerImpl(LocalFrame&, WebScreenOrientationClient*); | 48 ScreenOrientationControllerImpl(LocalFrame&, WebScreenOrientationClient*); |
| 49 | 49 |
| 50 static WebScreenOrientationType computeOrientation(const IntRect&, uint16_t); | 50 static WebScreenOrientationType computeOrientation(const IntRect&, uint16_t); |
| 51 | 51 |
| 52 // Inherited from PlatformEventController. | 52 // Inherited from PlatformEventController. |
| 53 void didUpdateData() override; | 53 void didUpdateData() override; |
| 54 void registerWithDispatcher() override; | 54 void registerWithDispatcher() override; |
| 55 void unregisterWithDispatcher() override; | 55 void unregisterWithDispatcher() override; |
| 56 bool hasLastData() override; | 56 bool hasLastData() override; |
| 57 |
| 58 // Inherited from ContextLifecycleObserver and PageVisibilityObserver. |
| 59 void contextDestroyed(ExecutionContext*) override; |
| 60 void contextDestroyed(Page*) override; |
| 57 void pageVisibilityChanged() override; | 61 void pageVisibilityChanged() override; |
| 58 | 62 |
| 59 // Inherited from ContextLifecycleObserver. | |
| 60 void contextDestroyed() override; | |
| 61 | |
| 62 void notifyDispatcher(); | 63 void notifyDispatcher(); |
| 63 | 64 |
| 64 void updateOrientation(); | 65 void updateOrientation(); |
| 65 | 66 |
| 66 void dispatchEventTimerFired(TimerBase*); | 67 void dispatchEventTimerFired(TimerBase*); |
| 67 | 68 |
| 68 bool isActiveAndVisible() const; | 69 bool isActiveAndVisible() const; |
| 69 | 70 |
| 70 Member<ScreenOrientation> m_orientation; | 71 Member<ScreenOrientation> m_orientation; |
| 71 WebScreenOrientationClient* m_client; | 72 WebScreenOrientationClient* m_client; |
| 72 Timer<ScreenOrientationControllerImpl> m_dispatchEventTimer; | 73 Timer<ScreenOrientationControllerImpl> m_dispatchEventTimer; |
| 73 bool m_activeLock = false; | 74 bool m_activeLock = false; |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace blink | 77 } // namespace blink |
| 77 | 78 |
| 78 #endif // ScreenOrientationControllerImpl_h | 79 #endif // ScreenOrientationControllerImpl_h |
| OLD | NEW |