summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-24 14:08:36 +0000
committermlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-24 14:08:36 +0000
commit39b3f80d464f67f8b1db2dfa914551b339454d84 (patch)
treee9282d8c30827fec4ea1415458207e1dd1355ee8
parent48156a49e5734f1d61ba49f10e69f6011134b9a8 (diff)
downloadchromium_src-39b3f80d464f67f8b1db2dfa914551b339454d84.zip
chromium_src-39b3f80d464f67f8b1db2dfa914551b339454d84.tar.gz
chromium_src-39b3f80d464f67f8b1db2dfa914551b339454d84.tar.bz2
Update the content/ layer to accept 'natural' screen orientation lock.
BUG=162827 Review URL: https://codereview.chromium.org/355443002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279396 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/child/assert_matching_enums.cc2
-rw-r--r--content/common/screen_orientation_messages.h2
-rw-r--r--content/public/common/screen_orientation_values_list.h1
-rw-r--r--content/renderer/screen_orientation/mock_screen_orientation_controller.cc3
4 files changed, 6 insertions, 2 deletions
diff --git a/content/child/assert_matching_enums.cc b/content/child/assert_matching_enums.cc
index f52f6ad..0601191 100644
--- a/content/child/assert_matching_enums.cc
+++ b/content/child/assert_matching_enums.cc
@@ -35,6 +35,8 @@ COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape,
LANDSCAPE);
COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait,
PORTRAIT);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockNatural,
+ NATURAL);
// SupportsType
COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsNotSupported,
diff --git a/content/common/screen_orientation_messages.h b/content/common/screen_orientation_messages.h
index ea6640c..334c765 100644
--- a/content/common/screen_orientation_messages.h
+++ b/content/common/screen_orientation_messages.h
@@ -21,7 +21,7 @@ IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationType,
blink::WebScreenOrientationLandscapeSecondary)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationLockType,
blink::WebScreenOrientationLockDefault,
- blink::WebScreenOrientationLockPortrait)
+ blink::WebScreenOrientationLockNatural)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(
blink::WebLockOrientationError,
blink::WebLockOrientationErrorNotAvailable,
diff --git a/content/public/common/screen_orientation_values_list.h b/content/public/common/screen_orientation_values_list.h
index 9cc6f92..46ef678 100644
--- a/content/public/common/screen_orientation_values_list.h
+++ b/content/public/common/screen_orientation_values_list.h
@@ -19,5 +19,6 @@ DEFINE_SCREEN_ORIENTATION_VALUE(LANDSCAPE_SECONDARY, 4)
DEFINE_SCREEN_ORIENTATION_VALUE(ANY, 5)
DEFINE_SCREEN_ORIENTATION_VALUE(LANDSCAPE, 6)
DEFINE_SCREEN_ORIENTATION_VALUE(PORTRAIT, 7)
+DEFINE_SCREEN_ORIENTATION_VALUE(NATURAL, 8)
#endif // CONTENT_PUBLIC_COMMON_SCREEN_ORIENTATION_VALUES_LIST_H_
diff --git a/content/renderer/screen_orientation/mock_screen_orientation_controller.cc b/content/renderer/screen_orientation/mock_screen_orientation_controller.cc
index 7f9dd89..87f7319 100644
--- a/content/renderer/screen_orientation/mock_screen_orientation_controller.cc
+++ b/content/renderer/screen_orientation/mock_screen_orientation_controller.cc
@@ -81,7 +81,8 @@ bool MockScreenOrientationController::IsOrientationAllowedByCurrentLock(
current_lock_ == blink::WebScreenOrientationLockPortrait;
case blink::WebScreenOrientationLandscapePrimary:
return current_lock_ == blink::WebScreenOrientationLockLandscapePrimary ||
- current_lock_ == blink::WebScreenOrientationLockLandscape;
+ current_lock_ == blink::WebScreenOrientationLockLandscape ||
+ current_lock_ == blink::WebScreenOrientationLockNatural;
case blink::WebScreenOrientationLandscapeSecondary:
return current_lock_ ==
blink::WebScreenOrientationLockLandscapeSecondary ||