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_EXCLUSIVE_ACCESS_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_MANAGER_H_ |
7 | 7 |
8 #include "base/feature_list.h" | 8 #include "base/feature_list.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" | 11 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" |
12 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 12 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
13 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h" | 13 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h" |
14 | 14 |
15 class ExclusiveAccessContext; | 15 class ExclusiveAccessContext; |
16 class FullscreenController; | 16 class FullscreenController; |
17 class GURL; | 17 class GURL; |
18 class MouseLockController; | 18 class MouseLockController; |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 struct NativeWebKeyboardEvent; | 21 struct NativeWebKeyboardEvent; |
22 class WebContents; | 22 class WebContents; |
23 } | 23 } |
24 | 24 |
25 // This class combines the different exclusive access modes (like fullscreen and | 25 // This class combines the different exclusive access modes (like fullscreen and |
26 // mouse lock) which are each handled by respective controller. It also updates | 26 // mouse lock) which are each handled by respective controller. It also updates |
27 // the exit bubble to reflect the combined state. | 27 // the exit bubble to reflect the combined state. |
28 class ExclusiveAccessManager { | 28 class ExclusiveAccessManager { |
29 public: | 29 public: |
30 // A new user experience for transitioning into fullscreen and mouse pointer | |
31 // lock states. | |
32 static const base::Feature kSimplifiedUIFeature; | |
33 | |
34 explicit ExclusiveAccessManager( | 30 explicit ExclusiveAccessManager( |
35 ExclusiveAccessContext* exclusive_access_context); | 31 ExclusiveAccessContext* exclusive_access_context); |
36 ~ExclusiveAccessManager(); | 32 ~ExclusiveAccessManager(); |
37 | 33 |
38 FullscreenController* fullscreen_controller() { | 34 FullscreenController* fullscreen_controller() { |
39 return &fullscreen_controller_; | 35 return &fullscreen_controller_; |
40 } | 36 } |
41 | 37 |
42 MouseLockController* mouse_lock_controller() { | 38 MouseLockController* mouse_lock_controller() { |
43 return &mouse_lock_controller_; | 39 return &mouse_lock_controller_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 73 |
78 private: | 74 private: |
79 ExclusiveAccessContext* const exclusive_access_context_; | 75 ExclusiveAccessContext* const exclusive_access_context_; |
80 FullscreenController fullscreen_controller_; | 76 FullscreenController fullscreen_controller_; |
81 MouseLockController mouse_lock_controller_; | 77 MouseLockController mouse_lock_controller_; |
82 | 78 |
83 DISALLOW_COPY_AND_ASSIGN(ExclusiveAccessManager); | 79 DISALLOW_COPY_AND_ASSIGN(ExclusiveAccessManager); |
84 }; | 80 }; |
85 | 81 |
86 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_MANAGER_H_ | 82 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_MANAGER_H_ |
OLD | NEW |