Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: ash/public/cpp/shell_window_ids.h

Issue 2786563003: Add a NOT_DRAWN window in between the root_window and its children. (Closed)
Patch Set: Add helper function to get WmWindow by Shell Id. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ 5 #ifndef ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_
6 #define ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ 6 #define ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "ash/public/cpp/ash_public_export.h" 11 #include "ash/public/cpp/ash_public_export.h"
12 12
13 // Declarations of ids of special shell windows. 13 // Declarations of ids of special shell windows.
14 14
15 namespace ash { 15 namespace ash {
16 16
17 // Used to indicate no shell window id. 17 // Used to indicate no shell window id.
18 const int32_t kShellWindowId_Invalid = -1; 18 const int32_t kShellWindowId_Invalid = -1;
19 19
20 // The screen rotation container in between root window and its children, used
21 // for screen rotation animation.
22 const int32_t kShellWindowId_ScreenRotationContainer = 0;
23
20 // A higher-level container that holds all of the containers stacked below 24 // A higher-level container that holds all of the containers stacked below
21 // kShellWindowId_LockScreenContainer. Only used by PowerButtonController for 25 // kShellWindowId_LockScreenContainer. Only used by PowerButtonController for
22 // animating lower-level containers. 26 // animating lower-level containers.
23 const int32_t kShellWindowId_NonLockScreenContainersContainer = 0; 27 const int32_t kShellWindowId_NonLockScreenContainersContainer = 1;
24 28
25 // A higher-level container that holds containers that hold lock-screen 29 // A higher-level container that holds containers that hold lock-screen
26 // windows. Only used by PowerButtonController for animating lower-level 30 // windows. Only used by PowerButtonController for animating lower-level
27 // containers. 31 // containers.
28 const int32_t kShellWindowId_LockScreenContainersContainer = 1; 32 const int32_t kShellWindowId_LockScreenContainersContainer = 2;
29 33
30 // A higher-level container that holds containers that hold lock-screen-related 34 // A higher-level container that holds containers that hold lock-screen-related
31 // windows (which we want to display while the screen is locked; effectively 35 // windows (which we want to display while the screen is locked; effectively
32 // containers stacked above kShellWindowId_LockSystemModalContainer). Only used 36 // containers stacked above kShellWindowId_LockSystemModalContainer). Only used
33 // by PowerButtonController for animating lower-level containers. 37 // by PowerButtonController for animating lower-level containers.
34 const int32_t kShellWindowId_LockScreenRelatedContainersContainer = 2; 38 const int32_t kShellWindowId_LockScreenRelatedContainersContainer = 3;
35 39
36 // A container used for windows of WINDOW_TYPE_CONTROL that have no parent. 40 // A container used for windows of WINDOW_TYPE_CONTROL that have no parent.
37 // This container is not visible. 41 // This container is not visible.
38 const int32_t kShellWindowId_UnparentedControlContainer = 3; 42 const int32_t kShellWindowId_UnparentedControlContainer = 4;
39 43
40 // The wallpaper (desktop background) window. 44 // The wallpaper (desktop background) window.
41 const int32_t kShellWindowId_WallpaperContainer = 4; 45 const int32_t kShellWindowId_WallpaperContainer = 5;
42 46
43 // The virtual keyboard container. 47 // The virtual keyboard container.
44 // NOTE: this is lazily created. 48 // NOTE: this is lazily created.
45 const int32_t kShellWindowId_VirtualKeyboardContainer = 5; 49 const int32_t kShellWindowId_VirtualKeyboardContainer = 6;
46 50
47 // The container for standard top-level windows. 51 // The container for standard top-level windows.
48 const int32_t kShellWindowId_DefaultContainer = 6; 52 const int32_t kShellWindowId_DefaultContainer = 7;
49 53
50 // The container for top-level windows with the 'always-on-top' flag set. 54 // The container for top-level windows with the 'always-on-top' flag set.
51 const int32_t kShellWindowId_AlwaysOnTopContainer = 7; 55 const int32_t kShellWindowId_AlwaysOnTopContainer = 8;
52 56
53 // The container for the shelf. 57 // The container for the shelf.
54 const int32_t kShellWindowId_ShelfContainer = 8; 58 const int32_t kShellWindowId_ShelfContainer = 9;
55 59
56 // The container for bubbles which float over the shelf. 60 // The container for bubbles which float over the shelf.
57 const int32_t kShellWindowId_ShelfBubbleContainer = 9; 61 const int32_t kShellWindowId_ShelfBubbleContainer = 10;
58 62
59 // The container for panel windows. 63 // The container for panel windows.
60 const int32_t kShellWindowId_PanelContainer = 10; 64 const int32_t kShellWindowId_PanelContainer = 11;
61 65
62 // The container for the app list. 66 // The container for the app list.
63 const int32_t kShellWindowId_AppListContainer = 11; 67 const int32_t kShellWindowId_AppListContainer = 12;
64 68
65 // The container for user-specific modal windows. 69 // The container for user-specific modal windows.
66 const int32_t kShellWindowId_SystemModalContainer = 12; 70 const int32_t kShellWindowId_SystemModalContainer = 13;
67 71
68 // The container for the lock screen wallpaper (lock screen background). 72 // The container for the lock screen wallpaper (lock screen background).
69 const int32_t kShellWindowId_LockScreenWallpaperContainer = 13; 73 const int32_t kShellWindowId_LockScreenWallpaperContainer = 14;
70 74
71 // The container for the lock screen. 75 // The container for the lock screen.
72 const int32_t kShellWindowId_LockScreenContainer = 14; 76 const int32_t kShellWindowId_LockScreenContainer = 15;
73 77
74 // The container for the lock screen modal windows. 78 // The container for the lock screen modal windows.
75 const int32_t kShellWindowId_LockSystemModalContainer = 15; 79 const int32_t kShellWindowId_LockSystemModalContainer = 16;
76 80
77 // The container for the status area. 81 // The container for the status area.
78 const int32_t kShellWindowId_StatusContainer = 16; 82 const int32_t kShellWindowId_StatusContainer = 17;
79 83
80 // A parent container that holds the virtual keyboard container and ime windows 84 // A parent container that holds the virtual keyboard container and ime windows
81 // if any. This is to ensure that the virtual keyboard or ime window is stacked 85 // if any. This is to ensure that the virtual keyboard or ime window is stacked
82 // above most containers but below the mouse cursor and the power off animation. 86 // above most containers but below the mouse cursor and the power off animation.
83 const int32_t kShellWindowId_ImeWindowParentContainer = 17; 87 const int32_t kShellWindowId_ImeWindowParentContainer = 18;
84 88
85 // The container for menus. 89 // The container for menus.
86 const int32_t kShellWindowId_MenuContainer = 18; 90 const int32_t kShellWindowId_MenuContainer = 19;
87 91
88 // The container for drag/drop images and tooltips. 92 // The container for drag/drop images and tooltips.
89 const int32_t kShellWindowId_DragImageAndTooltipContainer = 19; 93 const int32_t kShellWindowId_DragImageAndTooltipContainer = 20;
90 94
91 // The container for bubbles briefly overlaid onscreen to show settings changes 95 // The container for bubbles briefly overlaid onscreen to show settings changes
92 // (volume, brightness, input method bubbles, etc.). 96 // (volume, brightness, input method bubbles, etc.).
93 const int32_t kShellWindowId_SettingBubbleContainer = 20; 97 const int32_t kShellWindowId_SettingBubbleContainer = 21;
94 98
95 // The container for special components overlaid onscreen, such as the 99 // The container for special components overlaid onscreen, such as the
96 // region selector for partial screenshots. 100 // region selector for partial screenshots.
97 const int32_t kShellWindowId_OverlayContainer = 21; 101 const int32_t kShellWindowId_OverlayContainer = 22;
98 102
99 // ID of the window created by PhantomWindowController or DragWindowController. 103 // ID of the window created by PhantomWindowController or DragWindowController.
100 const int32_t kShellWindowId_PhantomWindow = 22; 104 const int32_t kShellWindowId_PhantomWindow = 23;
101 105
102 // The container for mouse cursor. 106 // The container for mouse cursor.
103 const int32_t kShellWindowId_MouseCursorContainer = 23; 107 const int32_t kShellWindowId_MouseCursorContainer = 24;
104 108
105 // The topmost container, used for power off animation. 109 // The topmost container, used for power off animation.
106 const int32_t kShellWindowId_PowerButtonAnimationContainer = 24; 110 const int32_t kShellWindowId_PowerButtonAnimationContainer = 25;
107 111
108 const int32_t kShellWindowId_Min = 0; 112 const int32_t kShellWindowId_Min = 0;
109 const int32_t kShellWindowId_Max = kShellWindowId_PowerButtonAnimationContainer; 113 const int32_t kShellWindowId_Max = kShellWindowId_PowerButtonAnimationContainer;
110 114
111 // A list of all the above valid container IDs. Add any new ID to this list. 115 // A list of all the above valid container IDs. Add any new ID to this list.
112 // This list is needed to validate we have no duplicate IDs. 116 // This list is needed to validate we have no duplicate IDs.
113 const int32_t kAllShellContainerIds[] = { 117 const int32_t kAllShellContainerIds[] = {
114 kShellWindowId_NonLockScreenContainersContainer, 118 kShellWindowId_ScreenRotationContainer,
115 kShellWindowId_LockScreenContainersContainer, 119 kShellWindowId_NonLockScreenContainersContainer,
116 kShellWindowId_LockScreenRelatedContainersContainer, 120 kShellWindowId_LockScreenContainersContainer,
117 kShellWindowId_UnparentedControlContainer, 121 kShellWindowId_LockScreenRelatedContainersContainer,
118 kShellWindowId_WallpaperContainer, 122 kShellWindowId_UnparentedControlContainer,
119 kShellWindowId_VirtualKeyboardContainer, 123 kShellWindowId_WallpaperContainer,
120 kShellWindowId_DefaultContainer, 124 kShellWindowId_VirtualKeyboardContainer,
121 kShellWindowId_AlwaysOnTopContainer, 125 kShellWindowId_DefaultContainer,
122 kShellWindowId_ShelfContainer, 126 kShellWindowId_AlwaysOnTopContainer,
123 kShellWindowId_ShelfBubbleContainer, 127 kShellWindowId_ShelfContainer,
124 kShellWindowId_PanelContainer, 128 kShellWindowId_ShelfBubbleContainer,
125 kShellWindowId_AppListContainer, 129 kShellWindowId_PanelContainer,
126 kShellWindowId_SystemModalContainer, 130 kShellWindowId_AppListContainer,
127 kShellWindowId_LockScreenWallpaperContainer, 131 kShellWindowId_SystemModalContainer,
128 kShellWindowId_LockScreenContainer, 132 kShellWindowId_LockScreenWallpaperContainer,
129 kShellWindowId_LockSystemModalContainer, 133 kShellWindowId_LockScreenContainer,
130 kShellWindowId_StatusContainer, 134 kShellWindowId_LockSystemModalContainer,
131 kShellWindowId_ImeWindowParentContainer, 135 kShellWindowId_StatusContainer,
132 kShellWindowId_MenuContainer, 136 kShellWindowId_ImeWindowParentContainer,
133 kShellWindowId_DragImageAndTooltipContainer, 137 kShellWindowId_MenuContainer,
134 kShellWindowId_SettingBubbleContainer, 138 kShellWindowId_DragImageAndTooltipContainer,
135 kShellWindowId_OverlayContainer, 139 kShellWindowId_SettingBubbleContainer,
136 kShellWindowId_PhantomWindow, 140 kShellWindowId_OverlayContainer,
137 kShellWindowId_MouseCursorContainer, 141 kShellWindowId_PhantomWindow,
138 kShellWindowId_PowerButtonAnimationContainer, 142 kShellWindowId_MouseCursorContainer,
143 kShellWindowId_PowerButtonAnimationContainer,
sadrul 2017/04/13 17:05:15 Oh ew. We really should fix this. See https://code
wutao 2017/04/13 18:09:39 Acknowledged.
139 }; 144 };
140 145
141 // These are the list of container ids of containers which may contain windows 146 // These are the list of container ids of containers which may contain windows
142 // that need to be activated. 147 // that need to be activated.
143 ASH_PUBLIC_EXPORT extern const int32_t kActivatableShellWindowIds[]; 148 ASH_PUBLIC_EXPORT extern const int32_t kActivatableShellWindowIds[];
144 ASH_PUBLIC_EXPORT extern const size_t kNumActivatableShellWindowIds; 149 ASH_PUBLIC_EXPORT extern const size_t kNumActivatableShellWindowIds;
145 150
146 // Returns true if |id| is in |kActivatableShellWindowIds|. 151 // Returns true if |id| is in |kActivatableShellWindowIds|.
147 ASH_PUBLIC_EXPORT bool IsActivatableShellWindowId(int32_t id); 152 ASH_PUBLIC_EXPORT bool IsActivatableShellWindowId(int32_t id);
148 153
149 } // namespace ash 154 } // namespace ash
150 155
151 #endif // ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ 156 #endif // ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698