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

Unified Diff: chrome/browser/ui/exclusive_access/mouse_lock_controller.h

Issue 1570443008: Fix FullscreenController tests with simplified-fullscreen-ui flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FullscreenControllerInteractiveTest: Further fixes for ChromeOS-only tests. Created 4 years, 11 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
Index: chrome/browser/ui/exclusive_access/mouse_lock_controller.h
diff --git a/chrome/browser/ui/exclusive_access/mouse_lock_controller.h b/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
index 924e8bba312b78b622b169de0a8216d35d7f2b16..e451f6bcede58517d16086806e71e958af69212b 100644
--- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
+++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
@@ -35,6 +35,14 @@ class MouseLockController : public ExclusiveAccessControllerBase {
void UnlockMouse();
+ // If true, does not call into the WebContents to lock the mouse. Just assumes
+ // that it works. This may be necessary when calling
+ // Browser::RequestToLockMouse in tests, because the proper signal will not
+ // have been passed to the RenderViewHost.
+ void set_fake_mouse_lock_for_test(bool value) {
+ fake_mouse_lock_for_test_ = value;
+ }
+
private:
enum MouseLockState {
MOUSELOCK_NOT_REQUESTED,
@@ -56,6 +64,8 @@ class MouseLockController : public ExclusiveAccessControllerBase {
MouseLockState mouse_lock_state_;
+ bool fake_mouse_lock_for_test_;
+
DISALLOW_COPY_AND_ASSIGN(MouseLockController);
};

Powered by Google App Engine
This is Rietveld 408576698