Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 | |
| 6 #ifndef ScreenOrientation_h | |
| 7 #define ScreenOrientation_h | |
| 8 | |
| 9 #include "core/dom/ActiveDOMObject.h" | |
| 10 #include "core/events/EventTarget.h" | |
| 11 #include "platform/Supplementable.h" | |
| 12 #include "wtf/Vector.h" | |
| 13 #include "wtf/text/AtomicString.h" | |
| 14 #include "wtf/text/WTFString.h" | |
| 15 | |
| 16 namespace WebCore { | |
| 17 | |
| 18 class Screen; | |
| 19 | |
| 20 class ScreenOrientation FINAL : public Supplement<Screen>, ActiveDOMObject { | |
|
Inactive
2014/02/16 02:01:57
Based on your comments on my other CL, I kept only
abarth-chromium
2014/02/16 04:03:48
Given that you're supplementing Screen, we might w
Inactive
2014/02/16 04:35:56
Done.
| |
| 21 public: | |
| 22 static ScreenOrientation* from(Screen*); | |
| 23 virtual ~ScreenOrientation(); | |
| 24 | |
| 25 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(orientationchange); | |
| 26 | |
| 27 static const AtomicString& orientation(Screen*); | |
| 28 static bool lockOrientation(Screen*, const Vector<String>& orientations); | |
| 29 static bool lockOrientation(Screen*, const AtomicString& orientation); | |
| 30 static void unlockOrientation(Screen*); | |
| 31 | |
| 32 void orientationChanged(); | |
| 33 | |
| 34 private: | |
| 35 explicit ScreenOrientation(Screen*); | |
| 36 static const char* supplementName(); | |
| 37 Screen* screen() const; | |
| 38 }; | |
| 39 | |
| 40 } // namespace WebCore | |
| 41 | |
| 42 #endif // ScreenOrientation_h | |
| OLD | NEW |