| Index: chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
|
| diff --git a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
|
| index 1a46837ea7818a28d9cd928d7db44da222fa84d1..92e943a0a153fdb5eb1092afa57994cde2c4a3bf 100644
|
| --- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
|
| +++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
|
| @@ -23,8 +23,8 @@ using content::WebContents;
|
|
|
| MouseLockController::MouseLockController(ExclusiveAccessManager* manager)
|
| : ExclusiveAccessControllerBase(manager),
|
| - mouse_lock_state_(MOUSELOCK_NOT_REQUESTED) {
|
| -}
|
| + mouse_lock_state_(MOUSELOCK_NOT_REQUESTED),
|
| + fake_mouse_lock_for_test_(false) {}
|
|
|
| MouseLockController::~MouseLockController() {
|
| }
|
| @@ -70,7 +70,8 @@ void MouseLockController::RequestToLockMouse(WebContents* web_contents,
|
| mouse_lock_state_ = MOUSELOCK_REQUESTED;
|
| } else {
|
| // Lock mouse.
|
| - if (web_contents->GotResponseToLockMouseRequest(true)) {
|
| + if (fake_mouse_lock_for_test_ ||
|
| + web_contents->GotResponseToLockMouseRequest(true)) {
|
| if (last_unlocked_by_target) {
|
| mouse_lock_state_ = MOUSELOCK_ACCEPTED_SILENTLY;
|
| } else {
|
|
|