Index: ash/wm/overview/window_selector_controller.cc |
diff --git a/ash/wm/overview/window_selector_controller.cc b/ash/wm/overview/window_selector_controller.cc |
index 73b9c148146c1129afb2de9ddd2c4f98de5ff4cc..4e622177034e20ac6a0722aa66a3ac8d3526d0a1 100644 |
--- a/ash/wm/overview/window_selector_controller.cc |
+++ b/ash/wm/overview/window_selector_controller.cc |
@@ -27,17 +27,20 @@ WindowSelectorController::~WindowSelectorController() { |
} |
// static |
-bool WindowSelectorController::CanSelect() { |
- // Don't allow a window overview if the screen is locked or a modal dialog is |
- // open or running in kiosk app session. |
+bool WindowSelectorController::IsUserInActiveDesktopEnvironment() { |
return Shell::GetInstance()->session_state_delegate()-> |
IsActiveUserSessionStarted() && |
!Shell::GetInstance()->session_state_delegate()->IsScreenLocked() && |
- !Shell::GetInstance()->IsSystemModalWindowOpen() && |
Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus() != |
user::LOGGED_IN_KIOSK_APP; |
} |
+// static |
+bool WindowSelectorController::CanSelect() { |
+ return IsUserInActiveDesktopEnvironment() && |
+ !Shell::GetInstance()->IsSystemModalWindowOpen(); |
+} |
+ |
void WindowSelectorController::ToggleOverview() { |
if (IsSelecting()) { |
OnSelectionEnded(); |