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 ScreenScreenOrientation_h | 5 #ifndef ScreenScreenOrientation_h |
6 #define ScreenScreenOrientation_h | 6 #define ScreenScreenOrientation_h |
7 | 7 |
8 #include "platform/Supplementable.h" | 8 #include "platform/Supplementable.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class ScreenOrientation; | 13 class ScreenOrientation; |
14 class Screen; | 14 class Screen; |
15 class ScriptState; | 15 class ScriptState; |
16 | 16 |
17 class ScreenScreenOrientation final : public GarbageCollected<ScreenScreenOrient
ation>, public HeapSupplement<Screen> { | 17 class ScreenScreenOrientation final : public GarbageCollected<ScreenScreenOrient
ation>, public Supplement<Screen> { |
18 USING_GARBAGE_COLLECTED_MIXIN(ScreenScreenOrientation); | 18 USING_GARBAGE_COLLECTED_MIXIN(ScreenScreenOrientation); |
19 public: | 19 public: |
20 static ScreenScreenOrientation& from(Screen&); | 20 static ScreenScreenOrientation& from(Screen&); |
21 | 21 |
22 static ScreenOrientation* orientation(ScriptState*, Screen&); | 22 static ScreenOrientation* orientation(ScriptState*, Screen&); |
23 | 23 |
24 DECLARE_VIRTUAL_TRACE(); | 24 DECLARE_VIRTUAL_TRACE(); |
25 | 25 |
26 private: | 26 private: |
27 static const char* supplementName(); | 27 static const char* supplementName(); |
28 | 28 |
29 Member<ScreenOrientation> m_orientation; | 29 Member<ScreenOrientation> m_orientation; |
30 }; | 30 }; |
31 | 31 |
32 } // namespace blink | 32 } // namespace blink |
33 | 33 |
34 #endif // ScreenScreenOrientation_h | 34 #endif // ScreenScreenOrientation_h |
OLD | NEW |