Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: ash/root_window_controller.cc

Issue 11117012: ash: Fix event processing in modal windows in login/lock screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698