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/desktop_background/desktop_background_controller.h" | 5 #include "ash/desktop_background/desktop_background_controller.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_view.h" | 7 #include "ash/desktop_background/desktop_background_view.h" |
8 #include "ash/desktop_background/desktop_background_widget_controller.h" | 8 #include "ash/desktop_background/desktop_background_widget_controller.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_factory.h" | 10 #include "ash/shell_factory.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 236 } |
237 | 237 |
238 void DesktopBackgroundController::MoveDesktopToLockedContainer() { | 238 void DesktopBackgroundController::MoveDesktopToLockedContainer() { |
239 if (locked_) | 239 if (locked_) |
240 return; | 240 return; |
241 locked_ = true; | 241 locked_ = true; |
242 ReparentBackgroundWidgets(GetBackgroundContainerId(false), | 242 ReparentBackgroundWidgets(GetBackgroundContainerId(false), |
243 GetBackgroundContainerId(true)); | 243 GetBackgroundContainerId(true)); |
244 } | 244 } |
245 | 245 |
| 246 void DesktopBackgroundController::CleanUpView(aura::RootWindow* root_window) { |
| 247 internal::ComponentWrapper *wrapper; |
| 248 wrapper = root_window->GetProperty(internal::kComponentWrapper); |
| 249 if (NULL == wrapper) |
| 250 return; |
| 251 wrapper->GetComponent(false)->CleanUpWidget(); |
| 252 } |
| 253 |
| 254 |
246 void DesktopBackgroundController::MoveDesktopToUnlockedContainer() { | 255 void DesktopBackgroundController::MoveDesktopToUnlockedContainer() { |
247 if (!locked_) | 256 if (!locked_) |
248 return; | 257 return; |
249 locked_ = false; | 258 locked_ = false; |
250 ReparentBackgroundWidgets(GetBackgroundContainerId(true), | 259 ReparentBackgroundWidgets(GetBackgroundContainerId(true), |
251 GetBackgroundContainerId(false)); | 260 GetBackgroundContainerId(false)); |
252 } | 261 } |
253 | 262 |
254 void DesktopBackgroundController::OnWindowDestroying(aura::Window* window) { | 263 void DesktopBackgroundController::OnWindowDestroying(aura::Window* window) { |
255 window->SetProperty(internal::kWindowDesktopComponent, | 264 window->SetProperty(internal::kWindowDesktopComponent, |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 } | 365 } |
357 } | 366 } |
358 } | 367 } |
359 | 368 |
360 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { | 369 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { |
361 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : | 370 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : |
362 internal::kShellWindowId_DesktopBackgroundContainer; | 371 internal::kShellWindowId_DesktopBackgroundContainer; |
363 } | 372 } |
364 | 373 |
365 } // namespace ash | 374 } // namespace ash |
OLD | NEW |