Index: ash/system/chromeos/screen_orientation/screen_orientation_delegate_ash.h |
diff --git a/ash/system/chromeos/screen_orientation/screen_orientation_delegate_ash.h b/ash/system/chromeos/screen_orientation/screen_orientation_delegate_ash.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c0bb67129a5f3bbed38965148d2c4730e51eaa23 |
--- /dev/null |
+++ b/ash/system/chromeos/screen_orientation/screen_orientation_delegate_ash.h |
@@ -0,0 +1,57 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ASH_SYSTEM_CHROMEOS_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ASH_H_ |
+#define ASH_SYSTEM_CHROMEOS_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ASH_H_ |
+ |
+#include "base/macros.h" |
+#include "content/public/browser/screen_orientation_delegate.h" |
+#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace ash { |
+ |
+// Implements ChromeOS specific functionality for ScreenOrientationProvider. |
+class ScreenOrientationDelegateAsh : public content::ScreenOrientationDelegate { |
+ public: |
+ ScreenOrientationDelegateAsh(); |
+ virtual ~ScreenOrientationDelegateAsh(); |
+ |
+ // content::ScreenOrientationDelegate: |
+ virtual bool FullScreenRequired(content::WebContents* web_contents) override; |
+ virtual void Lock( |
+ blink::WebScreenOrientationLockType lock_orientation) override; |
+ virtual bool ScreenOrientationProviderSupported() override; |
+ virtual void Unlock() override; |
+ |
+ private: |
+ |
mlamouri (slow - plz ping)
2014/10/15 15:39:33
nit: no empty line I guess?
jonross
2014/10/22 18:45:30
Done.
|
+ // Locks rotation to the angle matching the primary orientation for |
+ // |lock_orientation|. |
+ void LockRotationToPrimaryOrientation( |
+ blink::WebScreenOrientationLockType lock_orientation); |
+ |
+ // Locks rotation to the angle matching the secondary orientation for |
+ // |lock_orientation|. |
+ void LockRotationToSecondaryOrientation( |
+ blink::WebScreenOrientationLockType lock_orientation); |
+ |
+ // For orientations that do not specify primary or secondary, locks to the |
+ // current rotation if it matches |lock_orientation|. Otherwise locks to a |
+ // matching rotation. |
+ void LockToRotationMatchingOrientation( |
+ blink::WebScreenOrientationLockType lock_orientation); |
+ |
+ // The orientation of the display when at a rotation of 0. |
+ blink::WebScreenOrientationLockType natural_orientation_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDelegateAsh); |
+}; |
+ |
+} // namespace ash |
+ |
+#endif // ASH_SYSTEM_CHROMEOS_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ASH_H_ |