Chromium Code Reviews| Index: Source/modules/screen_orientation/ScreenOrientation.h |
| diff --git a/Source/modules/screen_orientation/ScreenOrientation.h b/Source/modules/screen_orientation/ScreenOrientation.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ca05ff0fe474ee72aa2f03fb3bbac7bb1acd5c92 |
| --- /dev/null |
| +++ b/Source/modules/screen_orientation/ScreenOrientation.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| + |
| +#ifndef ScreenOrientation_h |
| +#define ScreenOrientation_h |
| + |
| +#include "core/dom/ActiveDOMObject.h" |
| +#include "core/events/EventTarget.h" |
| +#include "platform/Supplementable.h" |
| +#include "wtf/Vector.h" |
| +#include "wtf/text/AtomicString.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace WebCore { |
| + |
| +class Screen; |
| + |
| +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.
|
| +public: |
| + static ScreenOrientation* from(Screen*); |
| + virtual ~ScreenOrientation(); |
| + |
| + DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(orientationchange); |
| + |
| + static const AtomicString& orientation(Screen*); |
| + static bool lockOrientation(Screen*, const Vector<String>& orientations); |
| + static bool lockOrientation(Screen*, const AtomicString& orientation); |
| + static void unlockOrientation(Screen*); |
| + |
| + void orientationChanged(); |
| + |
| +private: |
| + explicit ScreenOrientation(Screen*); |
| + static const char* supplementName(); |
| + Screen* screen() const; |
| +}; |
| + |
| +} // namespace WebCore |
| + |
| +#endif // ScreenOrientation_h |