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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 current_wallpaper_.reset(wo->ReleaseWallpaperData()); | 275 current_wallpaper_.reset(wo->ReleaseWallpaperData()); |
275 | 276 |
276 SetDesktopBackgroundImageMode(); | 277 SetDesktopBackgroundImageMode(); |
277 | 278 |
278 DCHECK(wo.get() == wallpaper_op_.get()); | 279 DCHECK(wo.get() == wallpaper_op_.get()); |
279 wallpaper_op_ = NULL; | 280 wallpaper_op_ = NULL; |
280 } | 281 } |
281 | 282 |
282 void DesktopBackgroundController::NotifyAnimationFinished() { | 283 void DesktopBackgroundController::NotifyAnimationFinished() { |
283 Shell* shell = Shell::GetInstance(); | 284 Shell* shell = Shell::GetInstance(); |
| 285 shell->GetPrimaryRootWindowController()->HandleDesktopBackgroundVisible(); |
284 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished(); | 286 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished(); |
285 } | 287 } |
286 | 288 |
287 ui::Layer* DesktopBackgroundController::SetColorLayerForContainer( | 289 ui::Layer* DesktopBackgroundController::SetColorLayerForContainer( |
288 SkColor color, | 290 SkColor color, |
289 aura::RootWindow* root_window, | 291 aura::RootWindow* root_window, |
290 int container_id) { | 292 int container_id) { |
291 ui::Layer* background_layer = new ui::Layer(ui::LAYER_SOLID_COLOR); | 293 ui::Layer* background_layer = new ui::Layer(ui::LAYER_SOLID_COLOR); |
292 background_layer->SetColor(color); | 294 background_layer->SetColor(color); |
293 | 295 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } | 372 } |
371 } | 373 } |
372 } | 374 } |
373 | 375 |
374 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { | 376 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { |
375 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : | 377 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : |
376 internal::kShellWindowId_DesktopBackgroundContainer; | 378 internal::kShellWindowId_DesktopBackgroundContainer; |
377 } | 379 } |
378 | 380 |
379 } // namespace ash | 381 } // namespace ash |
OLD | NEW |