| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h" | 8 #include "chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h" |
| 9 #include "components/content_settings/core/common/content_settings.h" | 9 #include "components/content_settings/core/common/content_settings.h" |
| 10 | 10 |
| 11 // This class implements mouselock behavior. | 11 // This class implements mouselock behavior. |
| 12 class MouseLockController : public ExclusiveAccessControllerBase { | 12 class MouseLockController : public ExclusiveAccessControllerBase { |
| 13 public: | 13 public: |
| 14 MouseLockController(ExclusiveAccessManager* manager, Browser* browser); | 14 explicit MouseLockController(ExclusiveAccessManager* manager); |
| 15 ~MouseLockController() override; | 15 ~MouseLockController() override; |
| 16 | 16 |
| 17 bool IsMouseLocked() const; | 17 bool IsMouseLocked() const; |
| 18 bool IsMouseLockSilentlyAccepted() const; | 18 bool IsMouseLockSilentlyAccepted() const; |
| 19 bool IsMouseLockRequested() const; | 19 bool IsMouseLockRequested() const; |
| 20 | 20 |
| 21 void RequestToLockMouse(content::WebContents* web_contents, | 21 void RequestToLockMouse(content::WebContents* web_contents, |
| 22 bool user_gesture, | 22 bool user_gesture, |
| 23 bool last_unlocked_by_target); | 23 bool last_unlocked_by_target); |
| 24 | 24 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 52 void NotifyTabExclusiveAccessLost() override; | 52 void NotifyTabExclusiveAccessLost() override; |
| 53 | 53 |
| 54 ContentSetting GetMouseLockSetting(const GURL& url) const; | 54 ContentSetting GetMouseLockSetting(const GURL& url) const; |
| 55 | 55 |
| 56 MouseLockState mouse_lock_state_; | 56 MouseLockState mouse_lock_state_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(MouseLockController); | 58 DISALLOW_COPY_AND_ASSIGN(MouseLockController); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_ | 61 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_ |
| OLD | NEW |