| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ash/wm/event_client_impl.h" |
| 6 |
| 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" |
| 9 #include "ui/aura/root_window.h" |
| 10 #include "ui/aura/window.h" |
| 11 |
| 12 namespace ash { |
| 13 namespace internal { |
| 14 |
| 15 EventClientImpl::EventClientImpl(aura::RootWindow* root_window) |
| 16 : root_window_(root_window) { |
| 17 aura::client::SetEventClient(root_window_, this); |
| 18 } |
| 19 |
| 20 EventClientImpl::~EventClientImpl() { |
| 21 aura::client::SetEventClient(root_window_, NULL); |
| 22 } |
| 23 |
| 24 bool EventClientImpl::CanProcessEventsWithinSubtree( |
| 25 const aura::Window* window) const { |
| 26 if (Shell::GetInstance()->IsScreenLocked()) { |
| 27 aura::Window* lock_screen_containers = |
| 28 Shell::GetInstance()->GetContainer( |
| 29 kShellWindowId_LockScreenContainersContainer); |
| 30 aura::Window* lock_screen_related_containers = |
| 31 Shell::GetInstance()->GetContainer( |
| 32 kShellWindowId_LockScreenRelatedContainersContainer); |
| 33 return lock_screen_containers->Contains(window) || |
| 34 lock_screen_related_containers->Contains(window); |
| 35 } |
| 36 return true; |
| 37 } |
| 38 |
| 39 } // namespace internal |
| 40 } // namespace ash |
| OLD | NEW |