OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ash/common/shell_window_ids.h" | |
6 | |
7 #include "base/macros.h" | |
8 | |
9 namespace ash { | |
10 | |
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 | |
13 // containers appearing later in the list. | |
14 const int kActivatableShellWindowIds[] = { | |
15 kShellWindowId_OverlayContainer, kShellWindowId_LockSystemModalContainer, | |
16 kShellWindowId_SettingBubbleContainer, kShellWindowId_LockScreenContainer, | |
17 kShellWindowId_SystemModalContainer, kShellWindowId_AlwaysOnTopContainer, | |
18 kShellWindowId_AppListContainer, kShellWindowId_DefaultContainer, | |
19 | |
20 // Docked, panel, launcher and status are intentionally checked after other | |
21 // containers even though these layers are higher. The user expects their | |
22 // windows to be focused before these elements. | |
23 kShellWindowId_DockedContainer, kShellWindowId_PanelContainer, | |
24 kShellWindowId_ShelfContainer, kShellWindowId_StatusContainer, | |
25 }; | |
26 | |
27 const size_t kNumActivatableShellWindowIds = | |
28 arraysize(kActivatableShellWindowIds); | |
29 | |
30 bool IsActivatableShellWindowId(int id) { | |
31 for (size_t i = 0; i < kNumActivatableShellWindowIds; i++) { | |
32 if (id == kActivatableShellWindowIds[i]) | |
33 return true; | |
34 } | |
35 return false; | |
36 } | |
37 | |
38 } // namespace ash | |
OLD | NEW |