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

Side by Side Diff: ash/root_window_controller.cc

Issue 10909008: Improve existing lock transition - remove black splash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/power_button_controller.h » ('j') | ash/wm/power_button_controller.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_widget_controller.h" 9 #include "ash/desktop_background/desktop_background_widget_controller.h"
10 #include "ash/display/display_controller.h" 10 #include "ash/display/display_controller.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 container->SetProperty(internal::kUsesScreenCoordinatesKey, true); 127 container->SetProperty(internal::kUsesScreenCoordinatesKey, true);
128 } 128 }
129 129
130 // Creates each of the special window containers that holds windows of various 130 // Creates each of the special window containers that holds windows of various
131 // types in the shell UI. 131 // types in the shell UI.
132 void CreateContainersInRootWindow(aura::RootWindow* root_window) { 132 void CreateContainersInRootWindow(aura::RootWindow* root_window) {
133 // These containers are just used by PowerButtonController to animate groups 133 // These containers are just used by PowerButtonController to animate groups
134 // of containers simultaneously without messing up the current transformations 134 // of containers simultaneously without messing up the current transformations
135 // on those containers. These are direct children of the root window; all of 135 // on those containers. These are direct children of the root window; all of
136 // the other containers are their children. 136 // the other containers are their children.
137 // Desktop and lock screen background containers are not part of the
138 // lock animation so they are not included in those animate groups.
139
140 aura::Window* desktop_background_containers = CreateContainer(
141 internal::kShellWindowId_DesktopBackgroundContainer,
142 "DesktopBackgroundContainer",
143 root_window);
144 SetChildWindowVisibilityChangesAnimated(desktop_background_containers);
145
137 aura::Window* non_lock_screen_containers = CreateContainer( 146 aura::Window* non_lock_screen_containers = CreateContainer(
138 internal::kShellWindowId_NonLockScreenContainersContainer, 147 internal::kShellWindowId_NonLockScreenContainersContainer,
139 "NonLockScreenContainersContainer", 148 "NonLockScreenContainersContainer",
140 root_window); 149 root_window);
150
151 aura::Window* lock_background_containers = CreateContainer(
Daniel Erat 2012/09/04 16:58:59 Nikita and I discussed this over IM. I didn't thi
Nikita (slow) 2012/09/04 17:36:42 Done.
152 internal::kShellWindowId_LockScreenBackgroundContainer,
153 "LockScreenBackgroundContainer",
154 root_window);
155 SetChildWindowVisibilityChangesAnimated(lock_background_containers);
156
141 aura::Window* lock_screen_containers = CreateContainer( 157 aura::Window* lock_screen_containers = CreateContainer(
142 internal::kShellWindowId_LockScreenContainersContainer, 158 internal::kShellWindowId_LockScreenContainersContainer,
143 "LockScreenContainersContainer", 159 "LockScreenContainersContainer",
144 root_window); 160 root_window);
145 aura::Window* lock_screen_related_containers = CreateContainer( 161 aura::Window* lock_screen_related_containers = CreateContainer(
146 internal::kShellWindowId_LockScreenRelatedContainersContainer, 162 internal::kShellWindowId_LockScreenRelatedContainersContainer,
147 "LockScreenRelatedContainersContainer", 163 "LockScreenRelatedContainersContainer",
148 root_window); 164 root_window);
149 165
150 CreateContainer(internal::kShellWindowId_UnparentedControlContainer, 166 CreateContainer(internal::kShellWindowId_UnparentedControlContainer,
151 "UnparentedControlContainer", 167 "UnparentedControlContainer",
152 non_lock_screen_containers); 168 non_lock_screen_containers);
153 169
154 CreateContainer(internal::kShellWindowId_SystemBackgroundContainer, 170 CreateContainer(internal::kShellWindowId_SystemBackgroundContainer,
155 "SystemBackgroundContainer", non_lock_screen_containers); 171 "SystemBackgroundContainer", non_lock_screen_containers);
156 172
157 aura::Window* desktop_background_containers = CreateContainer(
158 internal::kShellWindowId_DesktopBackgroundContainer,
159 "DesktopBackgroundContainer",
160 non_lock_screen_containers);
161 SetChildWindowVisibilityChangesAnimated(desktop_background_containers);
162
163 aura::Window* default_container = CreateContainer( 173 aura::Window* default_container = CreateContainer(
164 internal::kShellWindowId_DefaultContainer, 174 internal::kShellWindowId_DefaultContainer,
165 "DefaultContainer", 175 "DefaultContainer",
166 non_lock_screen_containers); 176 non_lock_screen_containers);
167 default_container->SetEventFilter( 177 default_container->SetEventFilter(
168 new ToplevelWindowEventFilter(default_container)); 178 new ToplevelWindowEventFilter(default_container));
169 SetChildWindowVisibilityChangesAnimated(default_container); 179 SetChildWindowVisibilityChangesAnimated(default_container);
170 SetUsesScreenCoordinates(default_container); 180 SetUsesScreenCoordinates(default_container);
171 181
172 aura::Window* always_on_top_container = CreateContainer( 182 aura::Window* always_on_top_container = CreateContainer(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 new internal::SystemModalContainerLayoutManager(modal_container)); 214 new internal::SystemModalContainerLayoutManager(modal_container));
205 SetChildWindowVisibilityChangesAnimated(modal_container); 215 SetChildWindowVisibilityChangesAnimated(modal_container);
206 SetUsesScreenCoordinates(modal_container); 216 SetUsesScreenCoordinates(modal_container);
207 217
208 aura::Window* input_method_container = CreateContainer( 218 aura::Window* input_method_container = CreateContainer(
209 internal::kShellWindowId_InputMethodContainer, 219 internal::kShellWindowId_InputMethodContainer,
210 "InputMethodContainer", 220 "InputMethodContainer",
211 non_lock_screen_containers); 221 non_lock_screen_containers);
212 SetUsesScreenCoordinates(input_method_container); 222 SetUsesScreenCoordinates(input_method_container);
213 223
214 aura::Window* lock_background_containers = CreateContainer(
215 internal::kShellWindowId_LockScreenBackgroundContainer,
216 "LockScreenBackgroundContainer",
217 lock_screen_containers);
218
219 SetChildWindowVisibilityChangesAnimated(lock_background_containers);
220
221 // TODO(beng): Figure out if we can make this use 224 // TODO(beng): Figure out if we can make this use
222 // SystemModalContainerEventFilter instead of stops_event_propagation. 225 // SystemModalContainerEventFilter instead of stops_event_propagation.
223 aura::Window* lock_container = CreateContainer( 226 aura::Window* lock_container = CreateContainer(
224 internal::kShellWindowId_LockScreenContainer, 227 internal::kShellWindowId_LockScreenContainer,
225 "LockScreenContainer", 228 "LockScreenContainer",
226 lock_screen_containers); 229 lock_screen_containers);
227 lock_container->SetLayoutManager( 230 lock_container->SetLayoutManager(
228 new internal::BaseLayoutManager(root_window)); 231 new internal::BaseLayoutManager(root_window));
229 SetUsesScreenCoordinates(lock_container); 232 SetUsesScreenCoordinates(lock_container);
230 // TODO(beng): stopsevents 233 // TODO(beng): stopsevents
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // Restore focused or active window if it's still alive. 369 // Restore focused or active window if it's still alive.
367 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { 370 if (focused && tracker.Contains(focused) && dst->Contains(focused)) {
368 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); 371 dst->GetFocusManager()->SetFocusedWindow(focused, NULL);
369 } else if (active && tracker.Contains(active) && dst->Contains(active)) { 372 } else if (active && tracker.Contains(active) && dst->Contains(active)) {
370 activation_client->ActivateWindow(active); 373 activation_client->ActivateWindow(active);
371 } 374 }
372 } 375 }
373 376
374 } // namespace internal 377 } // namespace internal
375 } // namespace ash 378 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/power_button_controller.h » ('j') | ash/wm/power_button_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698