| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 panel_layout_manager_(NULL) { | 154 panel_layout_manager_(NULL) { |
| 155 SetRootWindowController(root_window, this); | 155 SetRootWindowController(root_window, this); |
| 156 screen_dimmer_.reset(new ScreenDimmer(root_window)); | 156 screen_dimmer_.reset(new ScreenDimmer(root_window)); |
| 157 } | 157 } |
| 158 | 158 |
| 159 RootWindowController::~RootWindowController() { | 159 RootWindowController::~RootWindowController() { |
| 160 Shutdown(); | 160 Shutdown(); |
| 161 root_window_.reset(); | 161 root_window_.reset(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 // static |
| 165 internal::RootWindowController* |
| 166 RootWindowController::ForLauncher(aura::Window* window) { |
| 167 if (Shell::IsLauncherPerDisplayEnabled()) |
| 168 return GetRootWindowController(window->GetRootWindow()); |
| 169 else |
| 170 return Shell::GetPrimaryRootWindowController(); |
| 171 } |
| 172 |
| 164 void RootWindowController::Shutdown() { | 173 void RootWindowController::Shutdown() { |
| 165 CloseChildWindows(); | 174 CloseChildWindows(); |
| 166 if (Shell::GetActiveRootWindow() == root_window_.get()) { | 175 if (Shell::GetActiveRootWindow() == root_window_.get()) { |
| 167 Shell::GetInstance()->set_active_root_window( | 176 Shell::GetInstance()->set_active_root_window( |
| 168 Shell::GetPrimaryRootWindow() == root_window_.get() ? | 177 Shell::GetPrimaryRootWindow() == root_window_.get() ? |
| 169 NULL : Shell::GetPrimaryRootWindow()); | 178 NULL : Shell::GetPrimaryRootWindow()); |
| 170 } | 179 } |
| 171 SetRootWindowController(root_window_.get(), NULL); | 180 SetRootWindowController(root_window_.get(), NULL); |
| 172 screen_dimmer_.reset(); | 181 screen_dimmer_.reset(); |
| 173 workspace_controller_.reset(); | 182 workspace_controller_.reset(); |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 | 561 |
| 553 aura::Window* overlay_container = CreateContainer( | 562 aura::Window* overlay_container = CreateContainer( |
| 554 kShellWindowId_OverlayContainer, | 563 kShellWindowId_OverlayContainer, |
| 555 "OverlayContainer", | 564 "OverlayContainer", |
| 556 lock_screen_related_containers); | 565 lock_screen_related_containers); |
| 557 SetUsesScreenCoordinates(overlay_container); | 566 SetUsesScreenCoordinates(overlay_container); |
| 558 } | 567 } |
| 559 | 568 |
| 560 } // namespace internal | 569 } // namespace internal |
| 561 } // namespace ash | 570 } // namespace ash |
| OLD | NEW |