Index: ash/root_window_controller.cc |
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
index 9ea93445952700db7a1ae4b605fa1195a9369403..0767414d4248689e235245ea4190a1497f90c265 100644 |
--- a/ash/root_window_controller.cc |
+++ b/ash/root_window_controller.cc |
@@ -12,6 +12,7 @@ |
#include "ash/shell.h" |
#include "ash/shell_factory.h" |
#include "ash/shell_window_ids.h" |
+#include "ash/system/tray/system_tray_delegate.h" |
#include "ash/wm/base_layout_manager.h" |
#include "ash/wm/property_util.h" |
#include "ash/wm/root_window_layout_manager.h" |
@@ -169,9 +170,25 @@ void RootWindowController::Shutdown() { |
} |
SystemModalContainerLayoutManager* |
-RootWindowController::GetSystemModalLayoutManager() { |
+RootWindowController::GetSystemModalLayoutManager(aura::Window* window) { |
+ aura::Window* container = NULL; |
+ if (window) { |
+ container = GetContainer( |
+ kShellWindowId_LockSystemModalContainer); |
+ if (!container->Contains(window)) |
+ container = GetContainer(kShellWindowId_SystemModalContainer); |
+ } else { |
+ user::LoginStatus login = Shell::GetInstance()->tray_delegate() ? |
+ Shell::GetInstance()->tray_delegate()->GetUserLoginStatus() : |
sky
2012/10/12 17:00:37
nit: indent 4 for 182/183.
How come we have user l
sadrul
2012/10/12 18:24:30
Agree. Filed http://code.google.com/p/chromium/iss
|
+ user::LOGGED_IN_NONE; |
+ int modal_window_id = (login == user::LOGGED_IN_LOCKED || |
+ login == user::LOGGED_IN_NONE) ? |
+ kShellWindowId_LockSystemModalContainer : |
+ kShellWindowId_SystemModalContainer; |
+ container = GetContainer(modal_window_id); |
+ } |
return static_cast<SystemModalContainerLayoutManager*>( |
- GetContainer(kShellWindowId_SystemModalContainer)->layout_manager()); |
+ container->layout_manager()); |
} |
aura::Window* RootWindowController::GetContainer(int container_id) { |