OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/public/cpp/shell_window_ids.h" | 5 #include "ash/public/cpp/shell_window_ids.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 | 8 |
9 namespace ash { | 9 namespace ash { |
10 | 10 |
11 // NOTE: this list is ordered by activation order. That is, windows in | 11 // NOTE: this list is ordered by activation order. That is, windows in |
12 // containers appearing earlier in the list are activated before windows in | 12 // containers appearing earlier in the list are activated before windows in |
13 // containers appearing later in the list. | 13 // containers appearing later in the list. |
14 const int32_t kActivatableShellWindowIds[] = { | 14 const int32_t kActivatableShellWindowIds[] = { |
15 kShellWindowId_OverlayContainer, kShellWindowId_LockSystemModalContainer, | 15 kShellWindowId_OverlayContainer, kShellWindowId_LockSystemModalContainer, |
16 kShellWindowId_SettingBubbleContainer, kShellWindowId_LockScreenContainer, | 16 kShellWindowId_SettingBubbleContainer, |
17 kShellWindowId_SystemModalContainer, kShellWindowId_AlwaysOnTopContainer, | 17 kShellWindowId_LockActionHandlerContainer, |
18 kShellWindowId_AppListContainer, kShellWindowId_DefaultContainer, | 18 kShellWindowId_LockScreenContainer, kShellWindowId_SystemModalContainer, |
| 19 kShellWindowId_AlwaysOnTopContainer, kShellWindowId_AppListContainer, |
| 20 kShellWindowId_DefaultContainer, |
19 | 21 |
20 // Panel, launcher and status are intentionally checked after other | 22 // Panel, launcher and status are intentionally checked after other |
21 // containers even though these layers are higher. The user expects their | 23 // containers even though these layers are higher. The user expects their |
22 // windows to be focused before these elements. | 24 // windows to be focused before these elements. |
23 kShellWindowId_PanelContainer, kShellWindowId_ShelfContainer, | 25 kShellWindowId_PanelContainer, kShellWindowId_ShelfContainer, |
24 kShellWindowId_StatusContainer, | 26 kShellWindowId_StatusContainer, |
25 }; | 27 }; |
26 | 28 |
27 const size_t kNumActivatableShellWindowIds = | 29 const size_t kNumActivatableShellWindowIds = |
28 arraysize(kActivatableShellWindowIds); | 30 arraysize(kActivatableShellWindowIds); |
29 | 31 |
30 bool IsActivatableShellWindowId(int32_t id) { | 32 bool IsActivatableShellWindowId(int32_t id) { |
31 for (size_t i = 0; i < kNumActivatableShellWindowIds; i++) { | 33 for (size_t i = 0; i < kNumActivatableShellWindowIds; i++) { |
32 if (id == kActivatableShellWindowIds[i]) | 34 if (id == kActivatableShellWindowIds[i]) |
33 return true; | 35 return true; |
34 } | 36 } |
35 return false; | 37 return false; |
36 } | 38 } |
37 | 39 |
38 } // namespace ash | 40 } // namespace ash |
OLD | NEW |