Chromium Code Reviews| Index: ash/desktop_background/desktop_background_controller.h |
| diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h |
| index 505f7441792b86584a009f06becf2453195119f0..5f02fcaae2b870d735833a4b82af639be2f09a4a 100644 |
| --- a/ash/desktop_background/desktop_background_controller.h |
| +++ b/ash/desktop_background/desktop_background_controller.h |
| @@ -83,9 +83,7 @@ class ASH_EXPORT DesktopBackgroundController |
| return desktop_background_mode_; |
| } |
| - void set_command_line_for_testing(base::CommandLine* command_line) { |
| - command_line_for_testing_ = command_line; |
| - } |
| + void set_command_line_for_testing(base::CommandLine* command_line); |
| // Add/Remove observers. |
| void AddObserver(DesktopBackgroundControllerObserver* observer); |
| @@ -132,6 +130,11 @@ class ASH_EXPORT DesktopBackgroundController |
| // Returns true if the desktop moved. |
| bool MoveDesktopToUnlockedContainer(); |
| + // Use given files as default wallpaper. |
| + void SetDefaultWallpaperPath( |
| + const base::FilePath& customized_default_wallpaper_file_small, |
| + const base::FilePath& customized_default_wallpaper_file_large); |
| + |
| // Overrides DisplayController::Observer: |
| virtual void OnDisplayConfigurationChanged() OVERRIDE; |
| @@ -142,11 +145,22 @@ class ASH_EXPORT DesktopBackgroundController |
| // An operation to asynchronously loads wallpaper. |
| class WallpaperLoader; |
| + // Init "*default_*_wallpaper_file_" from given command line. |
| + void SetDefaultWallpaperPathFromCommandLine(base::CommandLine* command_line); |
| + |
| // Returns true if the specified default wallpaper is already being |
| // loaded by |wallpaper_loader_| or stored in |current_wallpaper_|. |
| + // (i.e. no need to reload if exactly duplicate request received) |
| bool DefaultWallpaperIsAlreadyLoadingOrLoaded( |
| const base::FilePath& image_file, int image_resource_id) const; |
| + // Returns true if the specified default wallpaper file is already being |
| + // loaded |wallpaper_loader_| or stored in |current_wallpaper_|. |
|
Mattias Nissler (ping if slow)
2014/03/24 20:38:54
nit: ... loaded *by* |wallpaper_loader|...
Alexander Alekseev
2014/03/25 14:38:29
Done.
|
| + // (i.e. if current wallpaper is "default" and we need to replace the default |
| + // wallpaper with another file, we need to initiate SetDefaultWallpaper() ) |
| + bool DefaultWallpaperFileIsAlreadyLoadingOrLoaded( |
| + const base::FilePath& image_file) const; |
| + |
| // Returns true if the specified custom wallpaper is already stored |
| // in |current_wallpaper_|. |
| bool CustomWallpaperIsAlreadyLoaded(const gfx::ImageSkia& image) const; |
| @@ -190,6 +204,14 @@ class ASH_EXPORT DesktopBackgroundController |
| // maximum width of all displays, and the maximum height of all displays. |
| static gfx::Size GetMaxDisplaySizeInNative(); |
| + // SetDefaultWallpaper using given path and mode. |
| + bool DoSetDefaultWallpaper(const base::FilePath& file_path, |
| + const bool use_large); |
| + |
| + // Before setting first wallpaper we need to check and probably apply |
| + // device customization. |
| + void CheckForCustomization(); |
| + |
| // If non-NULL, used in place of the real command line. |
| base::CommandLine* command_line_for_testing_; |
| @@ -222,6 +244,14 @@ class ASH_EXPORT DesktopBackgroundController |
| int wallpaper_reload_delay_; |
| + base::FilePath default_small_wallpaper_file_; |
| + base::FilePath default_large_wallpaper_file_; |
| + |
| + base::FilePath guest_default_small_wallpaper_file_; |
| + base::FilePath guest_default_large_wallpaper_file_; |
| + |
| + bool customization_applied_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
| }; |