Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: Source/modules/screen_orientation/ScreenOrientation.h

Issue 169403006: Screen Orientation API: screen.orientation & orientationchange event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/screen_orientation/ScreenOrientation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ScreenOrientation_h 5 #ifndef ScreenOrientation_h
6 #define ScreenOrientation_h 6 #define ScreenOrientation_h
7 7
8 #include "core/events/EventTarget.h" 8 #include "core/events/EventTarget.h"
9 #include "core/frame/DOMWindowProperty.h" 9 #include "core/frame/DOMWindowProperty.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 #include "wtf/text/AtomicString.h" 12 #include "wtf/text/AtomicString.h"
13 #include "wtf/text/WTFString.h" 13 #include "wtf/text/WTFString.h"
14 14
15 namespace WebCore { 15 namespace WebCore {
16 16
17 class Document;
17 class Screen; 18 class Screen;
18 19
19 class ScreenOrientation FINAL : public Supplement<Screen>, DOMWindowProperty { 20 class ScreenOrientation FINAL : public Supplement<Screen>, DOMWindowProperty {
20 public: 21 public:
21 static ScreenOrientation* from(Screen*); 22 static ScreenOrientation* from(Screen*);
22 virtual ~ScreenOrientation(); 23 virtual ~ScreenOrientation();
23 24
24 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(orientationchange); 25 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(orientationchange);
25 26
26 static const AtomicString& orientation(Screen*); 27 static const AtomicString& orientation(Screen*);
27 static bool lockOrientation(Screen*, const Vector<String>& orientations); 28 static bool lockOrientation(Screen*, const Vector<String>& orientations);
28 static bool lockOrientation(Screen*, const AtomicString& orientation); 29 static bool lockOrientation(Screen*, const AtomicString& orientation);
29 static void unlockOrientation(Screen*); 30 static void unlockOrientation(Screen*);
30 31
31 private: 32 private:
32 explicit ScreenOrientation(Screen*); 33 explicit ScreenOrientation(Screen*);
33 static const char* supplementName(); 34 static const char* supplementName();
34 Screen* screen() const; 35 Document* document() const;
35 }; 36 };
36 37
37 } // namespace WebCore 38 } // namespace WebCore
38 39
39 #endif // ScreenOrientation_h 40 #endif // ScreenOrientation_h
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/screen_orientation/ScreenOrientation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698