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

Unified Diff: content/renderer/screen_orientation/mock_screen_orientation_controller.h

Issue 300063012: Make async methods UpdateLock() and ResetLock() in MockScreenOrientationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated by comments Created 6 years, 7 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
« no previous file with comments | « no previous file | content/renderer/screen_orientation/mock_screen_orientation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..31420555fb247d24756883d2b6a915bf3bfe3080 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,10 @@ class MockScreenOrientationController {
void UpdateDeviceOrientation(blink::WebScreenOrientationType);
private:
+ virtual ~MockScreenOrientationController();
+
+ void UpdateLockSync(blink::WebScreenOrientationLockType);
+ void ResetLockSync();
void UpdateScreenOrientation(blink::WebScreenOrientationType);
bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType);
blink::WebScreenOrientationType SuitableOrientationForCurrentLock();
@@ -36,6 +43,8 @@ class MockScreenOrientationController {
blink::WebScreenOrientationListener* listener_;
DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationController);
+ friend class base::LazyInstance<MockScreenOrientationController>;
+ friend class base::RefCountedThreadSafe<MockScreenOrientationController>;
};
} // namespace content
« no previous file with comments | « no previous file | content/renderer/screen_orientation/mock_screen_orientation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698