| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/event_client_impl.h" | 5 #include "ash/wm/event_client_impl.h" |
| 6 | 6 |
| 7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/common/shell_window_ids.h" | 8 #include "ash/common/shell_window_ids.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| 11 #include "ui/keyboard/keyboard_util.h" | 11 #include "ui/keyboard/keyboard_util.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 | 14 |
| 15 EventClientImpl::EventClientImpl() { | 15 EventClientImpl::EventClientImpl() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 EventClientImpl::~EventClientImpl() { | 18 EventClientImpl::~EventClientImpl() { |
| 19 } | 19 } |
| 20 | 20 |
| 21 bool EventClientImpl::CanProcessEventsWithinSubtree( | 21 bool EventClientImpl::CanProcessEventsWithinSubtree( |
| 22 const aura::Window* window) const { | 22 const aura::Window* window) const { |
| 23 // TODO(oshima): Migrate this logic to Shell::CanWindowReceieveEvents and |
| 24 // remove this. |
| 23 const aura::Window* root_window = window ? window->GetRootWindow() : NULL; | 25 const aura::Window* root_window = window ? window->GetRootWindow() : NULL; |
| 24 if (!root_window || | 26 if (!root_window || |
| 25 !Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked()) { | 27 !Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked()) { |
| 26 return true; | 28 return true; |
| 27 } | 29 } |
| 28 | 30 |
| 29 const aura::Window* lock_screen_containers = Shell::GetContainer( | 31 const aura::Window* lock_screen_containers = Shell::GetContainer( |
| 30 root_window, | 32 root_window, |
| 31 kShellWindowId_LockScreenContainersContainer); | 33 kShellWindowId_LockScreenContainersContainer); |
| 32 const aura::Window* lock_background_containers = Shell::GetContainer( | 34 const aura::Window* lock_background_containers = Shell::GetContainer( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 49 virtual_keyboard_container->Contains(window)); | 51 virtual_keyboard_container->Contains(window)); |
| 50 } | 52 } |
| 51 return can_process_events; | 53 return can_process_events; |
| 52 } | 54 } |
| 53 | 55 |
| 54 ui::EventTarget* EventClientImpl::GetToplevelEventTarget() { | 56 ui::EventTarget* EventClientImpl::GetToplevelEventTarget() { |
| 55 return Shell::GetInstance(); | 57 return Shell::GetInstance(); |
| 56 } | 58 } |
| 57 | 59 |
| 58 } // namespace ash | 60 } // namespace ash |
| OLD | NEW |