| 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 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" | 5 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/app_mode/app_mode_utils.h" | 9 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 return result; | 101 return result; |
| 102 } | 102 } |
| 103 | 103 |
| 104 // static | 104 // static |
| 105 bool ExclusiveAccessManager::IsExperimentalKeyboardLockUIEnabled() { | 105 bool ExclusiveAccessManager::IsExperimentalKeyboardLockUIEnabled() { |
| 106 return base::FeatureList::IsEnabled(features::kExperimentalKeyboardLockUI); | 106 return base::FeatureList::IsEnabled(features::kExperimentalKeyboardLockUI); |
| 107 } | 107 } |
| 108 | 108 |
| 109 // static | 109 // static |
| 110 bool ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled() { | 110 bool ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled() { |
| 111 #if defined(OS_MACOSX) |
| 112 // Always enabled on Mac (the mouse cursor tracking required to implement the |
| 113 // non-simplified version is not implemented). |
| 114 return true; |
| 115 #else |
| 111 return base::FeatureList::IsEnabled(features::kSimplifiedFullscreenUI); | 116 return base::FeatureList::IsEnabled(features::kSimplifiedFullscreenUI); |
| 117 #endif |
| 112 } | 118 } |
| 113 | 119 |
| 114 void ExclusiveAccessManager::OnTabDeactivated(WebContents* web_contents) { | 120 void ExclusiveAccessManager::OnTabDeactivated(WebContents* web_contents) { |
| 115 fullscreen_controller_.OnTabDeactivated(web_contents); | 121 fullscreen_controller_.OnTabDeactivated(web_contents); |
| 116 mouse_lock_controller_.OnTabDeactivated(web_contents); | 122 mouse_lock_controller_.OnTabDeactivated(web_contents); |
| 117 } | 123 } |
| 118 | 124 |
| 119 void ExclusiveAccessManager::OnTabDetachedFromView(WebContents* web_contents) { | 125 void ExclusiveAccessManager::OnTabDetachedFromView(WebContents* web_contents) { |
| 120 fullscreen_controller_.OnTabDetachedFromView(web_contents); | 126 fullscreen_controller_.OnTabDetachedFromView(web_contents); |
| 121 mouse_lock_controller_.OnTabDetachedFromView(web_contents); | 127 mouse_lock_controller_.OnTabDetachedFromView(web_contents); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 if (fullscreen) | 223 if (fullscreen) |
| 218 fullscreen_controller_.RecordBubbleReshownUMA(); | 224 fullscreen_controller_.RecordBubbleReshownUMA(); |
| 219 if (mouselock) | 225 if (mouselock) |
| 220 mouse_lock_controller_.RecordBubbleReshownUMA(); | 226 mouse_lock_controller_.RecordBubbleReshownUMA(); |
| 221 } | 227 } |
| 222 | 228 |
| 223 void ExclusiveAccessManager::HandleUserHeldEscape() { | 229 void ExclusiveAccessManager::HandleUserHeldEscape() { |
| 224 fullscreen_controller_.HandleUserPressedEscape(); | 230 fullscreen_controller_.HandleUserPressedEscape(); |
| 225 mouse_lock_controller_.HandleUserPressedEscape(); | 231 mouse_lock_controller_.HandleUserPressedEscape(); |
| 226 } | 232 } |
| OLD | NEW |