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

Unified Diff: ash/shell.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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 95b6f9d1fc074465b9c90c76805d54667cd16d1d..ec062d02be661fbfc92bd1968565423984ad6f1f 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -233,6 +233,7 @@ Shell::~Shell() {
// The status area needs to be shut down before the windows are destroyed.
status_area_widget_->Shutdown();
+ status_area_widget_ = NULL;
// AppList needs to be released before shelf layout manager, which is
// destroyed with launcher container in the loop below. However, app list
@@ -671,7 +672,7 @@ void Shell::CreateModalBackground() {
RootWindowControllerList controllers = GetAllRootWindowControllers();
for (RootWindowControllerList::iterator iter = controllers.begin();
iter != controllers.end(); ++iter)
- (*iter)->GetSystemModalLayoutManager()->CreateModalBackground();
+ (*iter)->GetSystemModalLayoutManager(NULL)->CreateModalBackground();
}
void Shell::OnModalWindowRemoved(aura::Window* removed) {
@@ -679,24 +680,26 @@ void Shell::OnModalWindowRemoved(aura::Window* removed) {
bool activated = false;
for (RootWindowControllerList::iterator iter = controllers.begin();
iter != controllers.end() && !activated; ++iter) {
- activated =
- (*iter)->GetSystemModalLayoutManager()->ActivateNextModalWindow();
+ activated = (*iter)->GetSystemModalLayoutManager(removed)->
+ ActivateNextModalWindow();
}
if (!activated) {
RemoveEnvEventFilter(modality_filter_.get());
modality_filter_.reset();
for (RootWindowControllerList::iterator iter = controllers.begin();
iter != controllers.end(); ++iter)
- (*iter)->GetSystemModalLayoutManager()->DestroyModalBackground();
+ (*iter)->GetSystemModalLayoutManager(removed)->DestroyModalBackground();
}
}
SystemTrayDelegate* Shell::tray_delegate() {
- return status_area_widget_->system_tray_delegate();
+ return status_area_widget_ ? status_area_widget_->system_tray_delegate() :
+ NULL;
}
SystemTray* Shell::system_tray() {
- return status_area_widget_->system_tray();
+ return status_area_widget_ ? status_area_widget_->system_tray() :
+ NULL;
}
void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
@@ -758,9 +761,9 @@ void Shell::InitRootWindowController(
root_window->GetChildById(internal::kShellWindowId_AlwaysOnTopContainer));
root_window->SetProperty(internal::kAlwaysOnTopControllerKey,
always_on_top_controller);
- if (GetPrimaryRootWindowController()->GetSystemModalLayoutManager()->
+ if (GetPrimaryRootWindowController()->GetSystemModalLayoutManager(NULL)->
has_modal_background()) {
- controller->GetSystemModalLayoutManager()->CreateModalBackground();
+ controller->GetSystemModalLayoutManager(NULL)->CreateModalBackground();
}
window_cycle_controller_->OnRootWindowAdded(root_window);
@@ -820,7 +823,7 @@ bool Shell::CanWindowReceiveEvents(aura::Window* window) {
RootWindowControllerList controllers = GetAllRootWindowControllers();
for (RootWindowControllerList::iterator iter = controllers.begin();
iter != controllers.end(); ++iter) {
- if ((*iter)->GetSystemModalLayoutManager()->
+ if ((*iter)->GetSystemModalLayoutManager(window)->
CanWindowReceiveEvents(window)) {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698