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/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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 } | 280 } |
281 | 281 |
282 void RootWindowController::CreateContainers() { | 282 void RootWindowController::CreateContainers() { |
283 CreateContainersInRootWindow(root_window_.get()); | 283 CreateContainersInRootWindow(root_window_.get()); |
284 } | 284 } |
285 | 285 |
286 void RootWindowController::CloseChildWindows() { | 286 void RootWindowController::CloseChildWindows() { |
287 // Close background widget first as it depends on tooltip. | 287 // Close background widget first as it depends on tooltip. |
288 root_window_->SetProperty(kWindowDesktopComponent, | 288 root_window_->SetProperty(kWindowDesktopComponent, |
289 static_cast<DesktopBackgroundWidgetController*>(NULL)); | 289 static_cast<DesktopBackgroundWidgetController*>(NULL)); |
290 root_window_->SetProperty(kComponentWrapper, | |
291 static_cast<ComponentWrapper*>(NULL)); | |
292 | 290 |
293 workspace_controller_.reset(); | 291 workspace_controller_.reset(); |
294 aura::client::SetTooltipClient(root_window_.get(), NULL); | 292 aura::client::SetTooltipClient(root_window_.get(), NULL); |
295 | 293 |
296 while (!root_window_->children().empty()) { | 294 while (!root_window_->children().empty()) { |
297 aura::Window* child = root_window_->children()[0]; | 295 aura::Window* child = root_window_->children()[0]; |
298 delete child; | 296 delete child; |
299 } | 297 } |
300 } | 298 } |
301 | 299 |
(...skipping 22 matching lines...) Expand all Loading... |
324 // Restore focused or active window if it's still alive. | 322 // Restore focused or active window if it's still alive. |
325 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { | 323 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { |
326 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); | 324 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); |
327 } else if (active && tracker.Contains(active) && dst->Contains(active)) { | 325 } else if (active && tracker.Contains(active) && dst->Contains(active)) { |
328 activation_client->ActivateWindow(active); | 326 activation_client->ActivateWindow(active); |
329 } | 327 } |
330 } | 328 } |
331 | 329 |
332 } // namespace internal | 330 } // namespace internal |
333 } // namespace ash | 331 } // namespace ash |
OLD | NEW |