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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/screen_orientation/ScreenOrientation.h
diff --git a/Source/modules/screen_orientation/ScreenOrientation.h b/Source/modules/screen_orientation/ScreenOrientation.h
index 2fb20d810fb25b231e44ab710bd94b1a7be67613..194028ef84e92aa975e399c8ab2b87fe7ae19f8f 100644
--- a/Source/modules/screen_orientation/ScreenOrientation.h
+++ b/Source/modules/screen_orientation/ScreenOrientation.h
@@ -14,8 +14,21 @@
namespace WebCore {
+class Page;
class Screen;
+enum ScreenOrientationValue {
+ OrientationInvalid = 0,
+ OrientationPortraitPrimary = 1,
+ OrientationLandscapePrimary = 1 << 1,
+ OrientationPortraitSecondary = 1 << 2,
+ OrientationLandscapeSecondary = 1 << 3,
+ OrientationPortrait = OrientationPortraitPrimary | OrientationPortraitSecondary,
+ OrientationLandscape = OrientationLandscapePrimary | OrientationLandscapeSecondary,
+ OrientationAny = OrientationPortrait | OrientationLandscape
+};
+typedef unsigned char ScreenOrientationValues;
+
class ScreenOrientation FINAL : public Supplement<Screen>, DOMWindowProperty {
public:
static ScreenOrientation* from(Screen*);
@@ -28,10 +41,17 @@ public:
static bool lockOrientation(Screen*, const AtomicString& orientation);
static void unlockOrientation(Screen*);
+ void orientationChanged();
+
+ Page* page() const;
abarth-chromium 2014/02/18 01:34:27 Should this be private?
Inactive 2014/02/18 20:52:47 Done. No longer needed.
+
private:
explicit ScreenOrientation(Screen*);
+
static const char* supplementName();
Screen* screen() const;
+
+ static const AtomicString& orientationToString(ScreenOrientationValue);
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698