Chromium Code Reviews| Index: ash/wm/event_client_impl.cc |
| diff --git a/ash/wm/event_client_impl.cc b/ash/wm/event_client_impl.cc |
| index 4482c11c952e0ae8cbed5df1b2e04a668960c74f..22e754243541a2061e52c038b5b2d58a156a6844 100644 |
| --- a/ash/wm/event_client_impl.cc |
| +++ b/ash/wm/event_client_impl.cc |
| @@ -6,32 +6,30 @@ |
| #include "ash/shell.h" |
| #include "ash/shell_window_ids.h" |
| -#include "ui/aura/root_window.h" |
| #include "ui/aura/window.h" |
| namespace ash { |
| namespace internal { |
| -EventClientImpl::EventClientImpl(aura::RootWindow* root_window) |
| - : root_window_(root_window) { |
| - aura::client::SetEventClient(root_window_, this); |
| +EventClientImpl::EventClientImpl() { |
| } |
| EventClientImpl::~EventClientImpl() { |
| - aura::client::SetEventClient(root_window_, NULL); |
| } |
| bool EventClientImpl::CanProcessEventsWithinSubtree( |
| const aura::Window* window) const { |
| - if (Shell::GetInstance()->IsScreenLocked()) { |
| + aura::RootWindow* root_window = window ? |
| + const_cast<aura::RootWindow*>(window->GetRootWindow()) : NULL; |
|
oshima
2012/10/06 06:57:36
GetContainer doesn't change the state of root wind
Daniel Erat
2012/10/06 14:00:19
can you just make GetContainer() take a const wind
oshima
2012/10/06 17:20:58
It returns non const aura::Window*, so we can't ju
|
| + if (Shell::GetInstance()->IsScreenLocked() && root_window) { |
| aura::Window* lock_screen_containers = Shell::GetContainer( |
| - root_window_, |
| + root_window, |
| kShellWindowId_LockScreenContainersContainer); |
| aura::Window* lock_background_containers = Shell::GetContainer( |
| - root_window_, |
| + root_window, |
| kShellWindowId_LockScreenBackgroundContainer); |
| aura::Window* lock_screen_related_containers = Shell::GetContainer( |
| - root_window_, |
| + root_window, |
| kShellWindowId_LockScreenRelatedContainersContainer); |
| return lock_screen_containers->Contains(window) || |
| lock_background_containers->Contains(window) || |