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/PlatformEventController.h" | 8 #include "core/frame/PlatformEventController.h" |
9 #include "platform/Supplementable.h" | 9 #include "platform/Supplementable.h" |
10 #include "platform/Timer.h" | 10 #include "platform/Timer.h" |
11 #include "public/platform/WebLockOrientationCallback.h" | 11 #include "public/platform/WebLockOrientationCallback.h" |
12 #include "public/platform/WebScreenOrientationLockType.h" | 12 #include "public/platform/WebScreenOrientationLockType.h" |
13 #include "public/platform/WebScreenOrientationType.h" | 13 #include "public/platform/WebScreenOrientationType.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class FrameView; | 17 class FrameView; |
18 class ScreenOrientation; | 18 class ScreenOrientation; |
19 class WebScreenOrientationClient; | 19 class WebScreenOrientationClient; |
20 | 20 |
21 class ScreenOrientationController FINAL | 21 class ScreenOrientationController FINAL |
22 : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController> | 22 : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController> |
23 , public WillBeHeapSupplement<LocalFrame> | 23 , public WillBeHeapSupplement<LocalFrame> |
24 , public PlatformEventController { | 24 , public PlatformEventController { |
25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController); | 25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController); |
26 WTF_MAKE_NONCOPYABLE(ScreenOrientationController); | 26 WTF_MAKE_NONCOPYABLE(ScreenOrientationController); |
27 public: | 27 public: |
28 virtual ~ScreenOrientationController(); | 28 virtual ~ScreenOrientationController(); |
29 | 29 |
30 virtual void persistentHostHasBeenDestroyed() OVERRIDE; | |
31 | |
32 void setOrientation(ScreenOrientation*); | 30 void setOrientation(ScreenOrientation*); |
33 void notifyOrientationChanged(); | 31 void notifyOrientationChanged(); |
34 | 32 |
35 void lock(WebScreenOrientationLockType, WebLockOrientationCallback*); | 33 void lock(WebScreenOrientationLockType, WebLockOrientationCallback*); |
36 void unlock(); | 34 void unlock(); |
37 | 35 |
38 const LocalFrame& frame() const; | 36 const LocalFrame& frame() const; |
39 | 37 |
40 static void provideTo(LocalFrame&, WebScreenOrientationClient*); | 38 static void provideTo(LocalFrame&, WebScreenOrientationClient*); |
41 static ScreenOrientationController* from(LocalFrame&); | 39 static ScreenOrientationController* from(LocalFrame&); |
(...skipping 20 matching lines...) Expand all Loading... |
62 | 60 |
63 PersistentWillBeMember<ScreenOrientation> m_orientation; | 61 PersistentWillBeMember<ScreenOrientation> m_orientation; |
64 WebScreenOrientationClient* m_client; | 62 WebScreenOrientationClient* m_client; |
65 LocalFrame& m_frame; | 63 LocalFrame& m_frame; |
66 Timer<ScreenOrientationController> m_dispatchEventTimer; | 64 Timer<ScreenOrientationController> m_dispatchEventTimer; |
67 }; | 65 }; |
68 | 66 |
69 } // namespace blink | 67 } // namespace blink |
70 | 68 |
71 #endif // ScreenOrientationController_h | 69 #endif // ScreenOrientationController_h |
OLD | NEW |