| 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 31420555fb247d24756883d2b6a915bf3bfe3080..4d7f0eb4aef4fadd24bb626be7f3d599f0dea137 100644
|
| --- a/content/renderer/screen_orientation/mock_screen_orientation_controller.h
|
| +++ b/content/renderer/screen_orientation/mock_screen_orientation_controller.h
|
| @@ -8,6 +8,7 @@
|
| #include "base/lazy_instance.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "content/public/renderer/render_view_observer.h"
|
| #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
|
| #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
|
|
|
| @@ -16,9 +17,12 @@ class WebScreenOrientationListener;
|
| }
|
|
|
| namespace content {
|
| +class RenderView;
|
| +class RenderViewImpl;
|
|
|
| class MockScreenOrientationController
|
| - : public base::RefCountedThreadSafe<MockScreenOrientationController> {
|
| + : public base::RefCountedThreadSafe<MockScreenOrientationController>,
|
| + public RenderViewObserver {
|
| public:
|
| MockScreenOrientationController();
|
|
|
| @@ -26,7 +30,9 @@ class MockScreenOrientationController
|
| void ResetData();
|
| void UpdateLock(blink::WebScreenOrientationLockType);
|
| void ResetLock();
|
| - void UpdateDeviceOrientation(blink::WebScreenOrientationType);
|
| + void UpdateDeviceOrientation(
|
| + RenderView* render_view,
|
| + blink::WebScreenOrientationType);
|
|
|
| private:
|
| virtual ~MockScreenOrientationController();
|
| @@ -36,6 +42,10 @@ class MockScreenOrientationController
|
| void UpdateScreenOrientation(blink::WebScreenOrientationType);
|
| bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType);
|
| blink::WebScreenOrientationType SuitableOrientationForCurrentLock();
|
| + RenderViewImpl* render_view_impl() const;
|
| +
|
| + // RenderViewObserver
|
| + virtual void OnDestruct() OVERRIDE;
|
|
|
| blink::WebScreenOrientationLockType current_lock_;
|
| blink::WebScreenOrientationType device_orientation_;
|
|
|