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

Unified Diff: content/public/common/screen_orientation.mojom

Issue 2391883006: Mojo-ify implementation of screen orientation locking/unlocking. (Closed)
Patch Set: Ensure correct ordering between ViewMsg_Resize and screen orientation messages Created 4 years, 2 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: content/public/common/screen_orientation.mojom
diff --git a/content/public/common/screen_orientation.mojom b/content/public/common/screen_orientation.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..fb5345cfe48d07326e9d6d5cac1677b99f51b1de
--- /dev/null
+++ b/content/public/common/screen_orientation.mojom
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
blundell 2016/10/21 18:16:31 Is this duplicated with the one in //third_party/W
lunalu1 2016/10/24 16:57:36 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module content.mojom;
+
+enum ScreenOrientationLockResult {
+ // The lock was successfully applied.
+ SCREEN_ORIENTATION_LOCK_RESULT_SUCCESS,
+
+ // Failed because locking isn't available on the platform.
+ SCREEN_ORIENTATION_LOCK_RESULT_ERROR_NOT_AVAILABLE,
+
+ // Failed because fullscreen is required to lock.
+ SCREEN_ORIENTATION_LOCK_RESULT_ERROR_FULLSCREEN_REQUIRED,
+
+ // Failed because another lock/unlock got called before that one ended.
+ SCREEN_ORIENTATION_LOCK_RESULT_ERROR_CANCELED,
+};
+
+enum ScreenOrientationLockType {
+ DEFAULT = 0, // Equivalent to unlock.
+ PORTRAIT_PRIMARY,
+ PORTRAIT_SECONDARY,
+ LANDSCAPE_PRIMARY,
+ LANDSCAPE_SECONDARY,
+ ANY,
+ LANDSCAPE,
+ PORTRAIT,
+ NATURAL,
+};

Powered by Google App Engine
This is Rietveld 408576698