Chromium Code Reviews| Index: content/renderer/screen_orientation/mock_screen_orientation_controller.h |
| diff --git a/content/renderer/screen_orientation/mock_screen_orientation_controller.h b/content/renderer/screen_orientation/mock_screen_orientation_controller.h |
| index 330195c94be0fc358fdb93085e17277089f204f4..829561bb7451ba91b782717c19773df3eaec48dd 100644 |
| --- a/content/renderer/screen_orientation/mock_screen_orientation_controller.h |
| +++ b/content/renderer/screen_orientation/mock_screen_orientation_controller.h |
| @@ -5,7 +5,9 @@ |
| #ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER_H_ |
| #define CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER_H_ |
| +#include "base/lazy_instance.h" |
| #include "base/macros.h" |
| +#include "base/memory/ref_counted.h" |
| #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" |
| #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" |
| @@ -15,7 +17,8 @@ class WebScreenOrientationListener; |
| namespace content { |
| -class MockScreenOrientationController { |
| +class MockScreenOrientationController |
| + : public base::RefCountedThreadSafe<MockScreenOrientationController> { |
| public: |
| MockScreenOrientationController(); |
| @@ -26,6 +29,11 @@ class MockScreenOrientationController { |
| void UpdateDeviceOrientation(blink::WebScreenOrientationType); |
| private: |
| + // Private destructor to make clang compiler checks happy. |
| + ~MockScreenOrientationController() { } |
|
mlamouri (slow - plz ping)
2014/05/28 13:23:24
Please, make the dtor virtual, remove the comment
ostap
2014/05/28 14:40:21
Done.
|
| + |
| + void UpdateLockSync(blink::WebScreenOrientationLockType); |
| + void ResetLockSync(); |
| void UpdateScreenOrientation(blink::WebScreenOrientationType); |
| bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType); |
| blink::WebScreenOrientationType SuitableOrientationForCurrentLock(); |
| @@ -36,6 +44,8 @@ class MockScreenOrientationController { |
| blink::WebScreenOrientationListener* listener_; |
| DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationController); |
| + friend class base::LazyInstance<MockScreenOrientationController>; |
| + friend class base::RefCountedThreadSafe<MockScreenOrientationController>; |
| }; |
| } // namespace content |