| 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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/desktop_background/desktop_background_controller_observer.h" | 8 #include "ash/desktop_background/desktop_background_controller_observer.h" |
| 9 #include "ash/desktop_background/desktop_background_view.h" | 9 #include "ash/desktop_background/desktop_background_view.h" |
| 10 #include "ash/desktop_background/desktop_background_widget_controller.h" | 10 #include "ash/desktop_background/desktop_background_widget_controller.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 bool DesktopBackgroundController::MoveDesktopToUnlockedContainer() { | 353 bool DesktopBackgroundController::MoveDesktopToUnlockedContainer() { |
| 354 if (!locked_) | 354 if (!locked_) |
| 355 return false; | 355 return false; |
| 356 locked_ = false; | 356 locked_ = false; |
| 357 return ReparentBackgroundWidgets(GetBackgroundContainerId(true), | 357 return ReparentBackgroundWidgets(GetBackgroundContainerId(true), |
| 358 GetBackgroundContainerId(false)); | 358 GetBackgroundContainerId(false)); |
| 359 } | 359 } |
| 360 | 360 |
| 361 bool DesktopBackgroundController::DefaultWallpaperIsAlreadyLoadingOrLoaded( | 361 bool DesktopBackgroundController::DefaultWallpaperIsAlreadyLoadingOrLoaded( |
| 362 const base::FilePath& image_file, int image_resource_id) const { | 362 const base::FilePath& image_file, int image_resource_id) const { |
| 363 return (wallpaper_loader_ && | 363 return (wallpaper_loader_.get() && |
| 364 wallpaper_loader_->file_path() == image_file && | 364 wallpaper_loader_->file_path() == image_file && |
| 365 wallpaper_loader_->resource_id() == image_resource_id) || | 365 wallpaper_loader_->resource_id() == image_resource_id) || |
| 366 (current_wallpaper_.get() && | 366 (current_wallpaper_.get() && |
| 367 current_default_wallpaper_path_ == image_file && | 367 current_default_wallpaper_path_ == image_file && |
| 368 current_default_wallpaper_resource_id_ == image_resource_id); | 368 current_default_wallpaper_resource_id_ == image_resource_id); |
| 369 } | 369 } |
| 370 | 370 |
| 371 bool DesktopBackgroundController::CustomWallpaperIsAlreadyLoaded( | 371 bool DesktopBackgroundController::CustomWallpaperIsAlreadyLoaded( |
| 372 const gfx::ImageSkia& image) const { | 372 const gfx::ImageSkia& image) const { |
| 373 return current_wallpaper_.get() && | 373 return current_wallpaper_.get() && |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 } | 480 } |
| 481 return moved; | 481 return moved; |
| 482 } | 482 } |
| 483 | 483 |
| 484 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { | 484 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { |
| 485 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : | 485 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : |
| 486 internal::kShellWindowId_DesktopBackgroundContainer; | 486 internal::kShellWindowId_DesktopBackgroundContainer; |
| 487 } | 487 } |
| 488 | 488 |
| 489 } // namespace ash | 489 } // namespace ash |
| OLD | NEW |