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/root_window_controller.h" |
9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
10 #include "ash/shell_factory.h" | 11 #include "ash/shell_factory.h" |
11 #include "ash/shell_window_ids.h" | 12 #include "ash/shell_window_ids.h" |
12 #include "ash/wm/root_window_layout_manager.h" | 13 #include "ash/wm/root_window_layout_manager.h" |
13 #include "base/bind.h" | 14 #include "base/bind.h" |
14 #include "base/logging.h" | 15 #include "base/logging.h" |
15 #include "base/synchronization/cancellation_flag.h" | 16 #include "base/synchronization/cancellation_flag.h" |
16 #include "base/threading/worker_pool.h" | 17 #include "base/threading/worker_pool.h" |
17 #include "ui/aura/root_window.h" | 18 #include "ui/aura/root_window.h" |
18 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 current_wallpaper_.reset(wo->ReleaseWallpaperData()); | 271 current_wallpaper_.reset(wo->ReleaseWallpaperData()); |
271 | 272 |
272 SetDesktopBackgroundImageMode(); | 273 SetDesktopBackgroundImageMode(); |
273 | 274 |
274 DCHECK(wo.get() == wallpaper_op_.get()); | 275 DCHECK(wo.get() == wallpaper_op_.get()); |
275 wallpaper_op_ = NULL; | 276 wallpaper_op_ = NULL; |
276 } | 277 } |
277 | 278 |
278 void DesktopBackgroundController::NotifyAnimationFinished() { | 279 void DesktopBackgroundController::NotifyAnimationFinished() { |
279 Shell* shell = Shell::GetInstance(); | 280 Shell* shell = Shell::GetInstance(); |
| 281 shell->GetPrimaryRootWindowController()->HandleDesktopBackgroundVisible(); |
280 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished(); | 282 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished(); |
281 } | 283 } |
282 | 284 |
283 ui::Layer* DesktopBackgroundController::SetColorLayerForContainer( | 285 ui::Layer* DesktopBackgroundController::SetColorLayerForContainer( |
284 SkColor color, | 286 SkColor color, |
285 aura::RootWindow* root_window, | 287 aura::RootWindow* root_window, |
286 int container_id) { | 288 int container_id) { |
287 ui::Layer* background_layer = new ui::Layer(ui::LAYER_SOLID_COLOR); | 289 ui::Layer* background_layer = new ui::Layer(ui::LAYER_SOLID_COLOR); |
288 background_layer->SetColor(color); | 290 background_layer->SetColor(color); |
289 | 291 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 362 } |
361 return moved; | 363 return moved; |
362 } | 364 } |
363 | 365 |
364 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { | 366 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { |
365 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : | 367 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : |
366 internal::kShellWindowId_DesktopBackgroundContainer; | 368 internal::kShellWindowId_DesktopBackgroundContainer; |
367 } | 369 } |
368 | 370 |
369 } // namespace ash | 371 } // namespace ash |
OLD | NEW |