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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 new internal::SystemModalContainerLayoutManager(modal_container)); | 166 new internal::SystemModalContainerLayoutManager(modal_container)); |
167 SetChildWindowVisibilityChangesAnimated(modal_container); | 167 SetChildWindowVisibilityChangesAnimated(modal_container); |
168 SetUsesScreenCoordinates(modal_container); | 168 SetUsesScreenCoordinates(modal_container); |
169 | 169 |
170 aura::Window* input_method_container = CreateContainer( | 170 aura::Window* input_method_container = CreateContainer( |
171 internal::kShellWindowId_InputMethodContainer, | 171 internal::kShellWindowId_InputMethodContainer, |
172 "InputMethodContainer", | 172 "InputMethodContainer", |
173 non_lock_screen_containers); | 173 non_lock_screen_containers); |
174 SetUsesScreenCoordinates(input_method_container); | 174 SetUsesScreenCoordinates(input_method_container); |
175 | 175 |
| 176 aura::Window* lock_background_containers = CreateContainer( |
| 177 internal::kShellWindowId_LockScreenBackgroundContainer, |
| 178 "LockScreenBackgroundContainer", |
| 179 lock_screen_containers); |
| 180 |
| 181 SetChildWindowVisibilityChangesAnimated(lock_background_containers); |
| 182 |
176 // TODO(beng): Figure out if we can make this use | 183 // TODO(beng): Figure out if we can make this use |
177 // SystemModalContainerEventFilter instead of stops_event_propagation. | 184 // SystemModalContainerEventFilter instead of stops_event_propagation. |
178 aura::Window* lock_container = CreateContainer( | 185 aura::Window* lock_container = CreateContainer( |
179 internal::kShellWindowId_LockScreenContainer, | 186 internal::kShellWindowId_LockScreenContainer, |
180 "LockScreenContainer", | 187 "LockScreenContainer", |
181 lock_screen_containers); | 188 lock_screen_containers); |
182 lock_container->SetLayoutManager( | 189 lock_container->SetLayoutManager( |
183 new internal::BaseLayoutManager(root_window)); | 190 new internal::BaseLayoutManager(root_window)); |
184 SetUsesScreenCoordinates(lock_container); | 191 SetUsesScreenCoordinates(lock_container); |
185 // TODO(beng): stopsevents | 192 // TODO(beng): stopsevents |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 new internal::BaseLayoutManager( | 277 new internal::BaseLayoutManager( |
271 always_on_top_container->GetRootWindow())); | 278 always_on_top_container->GetRootWindow())); |
272 } | 279 } |
273 | 280 |
274 void RootWindowController::CreateContainers() { | 281 void RootWindowController::CreateContainers() { |
275 CreateContainersInRootWindow(root_window_.get()); | 282 CreateContainersInRootWindow(root_window_.get()); |
276 } | 283 } |
277 | 284 |
278 void RootWindowController::CloseChildWindows() { | 285 void RootWindowController::CloseChildWindows() { |
279 // Close background widget first as it depends on tooltip. | 286 // Close background widget first as it depends on tooltip. |
280 root_window_layout_->SetBackgroundWidget(NULL); | 287 root_window_layout_->SetBackgroundWidget(NULL, |
| 288 kShellWindowId_DesktopBackgroundContainer); |
281 workspace_controller_.reset(); | 289 workspace_controller_.reset(); |
282 aura::client::SetTooltipClient(root_window_.get(), NULL); | 290 aura::client::SetTooltipClient(root_window_.get(), NULL); |
283 | 291 |
284 while (!root_window_->children().empty()) { | 292 while (!root_window_->children().empty()) { |
285 aura::Window* child = root_window_->children()[0]; | 293 aura::Window* child = root_window_->children()[0]; |
286 delete child; | 294 delete child; |
287 } | 295 } |
288 } | 296 } |
289 | 297 |
290 bool RootWindowController::IsInMaximizedMode() const { | 298 bool RootWindowController::IsInMaximizedMode() const { |
(...skipping 21 matching lines...) Expand all Loading... |
312 // Restore focused or active window if it's still alive. | 320 // Restore focused or active window if it's still alive. |
313 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { | 321 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { |
314 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); | 322 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); |
315 } else if (active && tracker.Contains(active) && dst->Contains(active)) { | 323 } else if (active && tracker.Contains(active) && dst->Contains(active)) { |
316 activation_client->ActivateWindow(active); | 324 activation_client->ActivateWindow(active); |
317 } | 325 } |
318 } | 326 } |
319 | 327 |
320 } // namespace internal | 328 } // namespace internal |
321 } // namespace ash | 329 } // namespace ash |
OLD | NEW |