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

Unified Diff: Source/modules/screen_orientation/ScreenOrientation.cpp

Issue 204653002: Screen Orientation: use OrientationLockType enum for lockOrientation(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@screen_orientation_type
Patch Set: Created 6 years, 9 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.cpp
diff --git a/Source/modules/screen_orientation/ScreenOrientation.cpp b/Source/modules/screen_orientation/ScreenOrientation.cpp
index 6bf1ba750c008f061f4a73ba971e859456cd3409..51c609a4e5f5bc9e4251695415cd0473b18db431 100644
--- a/Source/modules/screen_orientation/ScreenOrientation.cpp
+++ b/Source/modules/screen_orientation/ScreenOrientation.cpp
@@ -53,9 +53,14 @@ static const AtomicString& orientationToString(blink::WebScreenOrientation orien
static blink::WebScreenOrientations stringToOrientations(const AtomicString& orientationString)
{
+ DEFINE_STATIC_LOCAL(const AtomicString, any, ("any", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(const AtomicString, portrait, ("portrait", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(const AtomicString, landscape, ("landscape", AtomicString::ConstructFromLiteral));
+ if (orientationString == any) {
+ return blink::WebScreenOrientationPortraitPrimary | blink::WebScreenOrientationPortraitSecondary |
+ blink::WebScreenOrientationLandscapePrimary | blink::WebScreenOrientationLandscapeSecondary;
+ }
if (orientationString == portrait)
return blink::WebScreenOrientationPortraitPrimary | blink::WebScreenOrientationPortraitSecondary;
if (orientationString == landscape)

Powered by Google App Engine
This is Rietveld 408576698