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/activation_controller.h" | 5 #include "ash/wm/activation_controller.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/activation_controller_delegate.h" | 10 #include "ash/wm/activation_controller_delegate.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 kShellWindowId_LockScreenContainer, | 36 kShellWindowId_LockScreenContainer, |
37 kShellWindowId_SystemModalContainer, | 37 kShellWindowId_SystemModalContainer, |
38 kShellWindowId_AlwaysOnTopContainer, | 38 kShellWindowId_AlwaysOnTopContainer, |
39 kShellWindowId_AppListContainer, | 39 kShellWindowId_AppListContainer, |
40 kShellWindowId_DefaultContainer, | 40 kShellWindowId_DefaultContainer, |
41 | 41 |
42 // Panel, launcher and status are intentionally checked after other | 42 // Panel, launcher and status are intentionally checked after other |
43 // containers even though these layers are higher. The user expects their | 43 // containers even though these layers are higher. The user expects their |
44 // windows to be focused before these elements. | 44 // windows to be focused before these elements. |
45 kShellWindowId_PanelContainer, | 45 kShellWindowId_PanelContainer, |
46 kShellWindowId_LauncherContainer, | 46 kShellWindowId_ShelfContainer, |
47 kShellWindowId_StatusContainer, | 47 kShellWindowId_StatusContainer, |
48 }; | 48 }; |
49 | 49 |
50 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window, | 50 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window, |
51 int container_id) { | 51 int container_id) { |
52 for (; window; window = window->parent()) { | 52 for (; window; window = window->parent()) { |
53 if (window->id() >= container_id) | 53 if (window->id() >= container_id) |
54 return true; | 54 return true; |
55 } | 55 } |
56 return false; | 56 return false; |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 aura::Window* window = static_cast<aura::Window*>(event->target()); | 423 aura::Window* window = static_cast<aura::Window*>(event->target()); |
424 window = delegate_->WillFocusWindow(window); | 424 window = delegate_->WillFocusWindow(window); |
425 if (GetActiveWindow() != window) { | 425 if (GetActiveWindow() != window) { |
426 aura::client::GetFocusClient(window)->FocusWindow( | 426 aura::client::GetFocusClient(window)->FocusWindow( |
427 FindFocusableWindowFor(window)); | 427 FindFocusableWindowFor(window)); |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 } // namespace internal | 431 } // namespace internal |
432 } // namespace ash | 432 } // namespace ash |
OLD | NEW |