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/ash_focus_rules.h" | 5 #include "ash/wm/ash_focus_rules.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 internal::kShellWindowId_LockScreenContainer, | 21 internal::kShellWindowId_LockScreenContainer, |
22 internal::kShellWindowId_SystemModalContainer, | 22 internal::kShellWindowId_SystemModalContainer, |
23 internal::kShellWindowId_AlwaysOnTopContainer, | 23 internal::kShellWindowId_AlwaysOnTopContainer, |
24 internal::kShellWindowId_AppListContainer, | 24 internal::kShellWindowId_AppListContainer, |
25 internal::kShellWindowId_DefaultContainer, | 25 internal::kShellWindowId_DefaultContainer, |
26 | 26 |
27 // Panel, launcher and status are intentionally checked after other | 27 // Panel, launcher and status are intentionally checked after other |
28 // containers even though these layers are higher. The user expects their | 28 // containers even though these layers are higher. The user expects their |
29 // windows to be focused before these elements. | 29 // windows to be focused before these elements. |
30 internal::kShellWindowId_PanelContainer, | 30 internal::kShellWindowId_PanelContainer, |
31 internal::kShellWindowId_LauncherContainer, | 31 internal::kShellWindowId_ShelfContainer, |
32 internal::kShellWindowId_StatusContainer, | 32 internal::kShellWindowId_StatusContainer, |
33 }; | 33 }; |
34 | 34 |
35 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window, | 35 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window, |
36 int container_id) { | 36 int container_id) { |
37 for (; window; window = window->parent()) { | 37 for (; window; window = window->parent()) { |
38 if (window->id() >= container_id) | 38 if (window->id() >= container_id) |
39 return true; | 39 return true; |
40 } | 40 } |
41 return false; | 41 return false; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 i != container->children().rend(); | 171 i != container->children().rend(); |
172 ++i) { | 172 ++i) { |
173 if (*i != ignore && CanActivateWindow(*i) && !wm::IsWindowMinimized(*i)) | 173 if (*i != ignore && CanActivateWindow(*i) && !wm::IsWindowMinimized(*i)) |
174 return *i; | 174 return *i; |
175 } | 175 } |
176 return NULL; | 176 return NULL; |
177 } | 177 } |
178 | 178 |
179 } // namespace wm | 179 } // namespace wm |
180 } // namespace ash | 180 } // namespace ash |
OLD | NEW |