| 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/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // TODO(oshima): Migrate this logic to Shell::CanWindowReceieveEvents and | 22 // TODO(oshima): Migrate this logic to Shell::CanWindowReceieveEvents and |
| 23 // remove this. | 23 // remove this. |
| 24 const aura::Window* root_window = window ? window->GetRootWindow() : NULL; | 24 const aura::Window* root_window = window ? window->GetRootWindow() : NULL; |
| 25 if (!root_window || | 25 if (!root_window || |
| 26 !WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked()) { | 26 !WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked()) { |
| 27 return true; | 27 return true; |
| 28 } | 28 } |
| 29 | 29 |
| 30 const aura::Window* lock_screen_containers = Shell::GetContainer( | 30 const aura::Window* lock_screen_containers = Shell::GetContainer( |
| 31 root_window, kShellWindowId_LockScreenContainersContainer); | 31 root_window, kShellWindowId_LockScreenContainersContainer); |
| 32 const aura::Window* lock_background_containers = Shell::GetContainer( | 32 const aura::Window* lock_wallpaper_containers = Shell::GetContainer( |
| 33 root_window, kShellWindowId_LockScreenBackgroundContainer); | 33 root_window, kShellWindowId_LockScreenWallpaperContainer); |
| 34 const aura::Window* lock_screen_related_containers = Shell::GetContainer( | 34 const aura::Window* lock_screen_related_containers = Shell::GetContainer( |
| 35 root_window, kShellWindowId_LockScreenRelatedContainersContainer); | 35 root_window, kShellWindowId_LockScreenRelatedContainersContainer); |
| 36 bool can_process_events = | 36 bool can_process_events = |
| 37 (window->Contains(lock_screen_containers) && | 37 (window->Contains(lock_screen_containers) && |
| 38 window->Contains(lock_background_containers) && | 38 window->Contains(lock_wallpaper_containers) && |
| 39 window->Contains(lock_screen_related_containers)) || | 39 window->Contains(lock_screen_related_containers)) || |
| 40 lock_screen_containers->Contains(window) || | 40 lock_screen_containers->Contains(window) || |
| 41 lock_background_containers->Contains(window) || | 41 lock_wallpaper_containers->Contains(window) || |
| 42 lock_screen_related_containers->Contains(window); | 42 lock_screen_related_containers->Contains(window); |
| 43 if (keyboard::IsKeyboardEnabled()) { | 43 if (keyboard::IsKeyboardEnabled()) { |
| 44 const aura::Window* virtual_keyboard_container = Shell::GetContainer( | 44 const aura::Window* virtual_keyboard_container = Shell::GetContainer( |
| 45 root_window, kShellWindowId_VirtualKeyboardContainer); | 45 root_window, kShellWindowId_VirtualKeyboardContainer); |
| 46 can_process_events |= (window->Contains(virtual_keyboard_container) || | 46 can_process_events |= (window->Contains(virtual_keyboard_container) || |
| 47 virtual_keyboard_container->Contains(window)); | 47 virtual_keyboard_container->Contains(window)); |
| 48 } | 48 } |
| 49 return can_process_events; | 49 return can_process_events; |
| 50 } | 50 } |
| 51 | 51 |
| 52 ui::EventTarget* EventClientImpl::GetToplevelEventTarget() { | 52 ui::EventTarget* EventClientImpl::GetToplevelEventTarget() { |
| 53 return Shell::GetInstance(); | 53 return Shell::GetInstance(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace ash | 56 } // namespace ash |
| OLD | NEW |