OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER_H
_ |
| 6 #define CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER_H
_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" |
| 10 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" |
| 11 |
| 12 namespace blink { |
| 13 class WebScreenOrientationListener; |
| 14 } |
| 15 |
| 16 namespace content { |
| 17 |
| 18 class MockScreenOrientationController { |
| 19 public: |
| 20 MockScreenOrientationController(); |
| 21 |
| 22 void SetListener(blink::WebScreenOrientationListener* listener); |
| 23 void ResetData(); |
| 24 void UpdateLock(blink::WebScreenOrientationLockType); |
| 25 void ResetLock(); |
| 26 void UpdateDeviceOrientation(blink::WebScreenOrientationType); |
| 27 |
| 28 private: |
| 29 void UpdateScreenOrientation(blink::WebScreenOrientationType); |
| 30 bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType); |
| 31 blink::WebScreenOrientationType SuitableOrientationForCurrentLock(); |
| 32 |
| 33 blink::WebScreenOrientationLockType current_lock_; |
| 34 blink::WebScreenOrientationType device_orientation_; |
| 35 blink::WebScreenOrientationType current_orientation_; |
| 36 blink::WebScreenOrientationListener* listener_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationController); |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER
_H_ |
OLD | NEW |