| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 94 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 95 switches::kEnableSimplifiedFullscreenUI)) { | 95 switches::kEnableSimplifiedFullscreenUI)) { |
| 96 return true; | 96 return true; |
| 97 } | 97 } |
| 98 | 98 |
| 99 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 99 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 100 switches::kDisableSimplifiedFullscreenUI)) { | 100 switches::kDisableSimplifiedFullscreenUI)) { |
| 101 return false; | 101 return false; |
| 102 } | 102 } |
| 103 | 103 |
| 104 // Enabled by default on Aura platforms only. |
| 105 #if defined(USE_AURA) |
| 106 return true; |
| 107 #else |
| 104 return false; | 108 return false; |
| 109 #endif // defined(USE_AURA) |
| 105 } | 110 } |
| 106 | 111 |
| 107 void ExclusiveAccessManager::OnTabDeactivated(WebContents* web_contents) { | 112 void ExclusiveAccessManager::OnTabDeactivated(WebContents* web_contents) { |
| 108 fullscreen_controller_.OnTabDeactivated(web_contents); | 113 fullscreen_controller_.OnTabDeactivated(web_contents); |
| 109 mouse_lock_controller_.OnTabDeactivated(web_contents); | 114 mouse_lock_controller_.OnTabDeactivated(web_contents); |
| 110 } | 115 } |
| 111 | 116 |
| 112 void ExclusiveAccessManager::OnTabDetachedFromView(WebContents* web_contents) { | 117 void ExclusiveAccessManager::OnTabDetachedFromView(WebContents* web_contents) { |
| 113 fullscreen_controller_.OnTabDetachedFromView(web_contents); | 118 fullscreen_controller_.OnTabDetachedFromView(web_contents); |
| 114 mouse_lock_controller_.OnTabDetachedFromView(web_contents); | 119 mouse_lock_controller_.OnTabDetachedFromView(web_contents); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 144 bool updateBubble = mouse_lock_controller_.OnDenyExclusiveAccessPermission(); | 149 bool updateBubble = mouse_lock_controller_.OnDenyExclusiveAccessPermission(); |
| 145 updateBubble |= fullscreen_controller_.OnDenyExclusiveAccessPermission(); | 150 updateBubble |= fullscreen_controller_.OnDenyExclusiveAccessPermission(); |
| 146 if (updateBubble) | 151 if (updateBubble) |
| 147 UpdateExclusiveAccessExitBubbleContent(); | 152 UpdateExclusiveAccessExitBubbleContent(); |
| 148 } | 153 } |
| 149 | 154 |
| 150 void ExclusiveAccessManager::ExitExclusiveAccess() { | 155 void ExclusiveAccessManager::ExitExclusiveAccess() { |
| 151 fullscreen_controller_.ExitExclusiveAccessToPreviousState(); | 156 fullscreen_controller_.ExitExclusiveAccessToPreviousState(); |
| 152 mouse_lock_controller_.LostMouseLock(); | 157 mouse_lock_controller_.LostMouseLock(); |
| 153 } | 158 } |
| OLD | NEW |