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..7111268b407a406b0fd06901d213960e54c8c954 100644 |
--- a/ash/desktop_background/desktop_background_controller.h |
+++ b/ash/desktop_background/desktop_background_controller.h |
@@ -135,6 +135,11 @@ class ASH_EXPORT DesktopBackgroundController |
// Overrides DisplayController::Observer: |
virtual void OnDisplayConfigurationChanged() OVERRIDE; |
+ // Use given files as default wallpaper. |
+ void SetDefaultWallpaperPath( |
Daniel Erat
2014/03/24 16:25:48
nit: move this above the overridden method (also i
Alexander Alekseev
2014/03/24 17:33:43
Done.
|
+ const base::FilePath& customized_default_wallpaper_file_small, |
Daniel Erat
2014/03/24 16:25:48
nit: mind removing the word "customized" from thes
Alexander Alekseev
2014/03/24 17:33:43
Done.
|
+ const base::FilePath& customized_default_wallpaper_file_large); |
+ |
private: |
friend class DesktopBackgroundControllerTest; |
FRIEND_TEST_ALL_PREFIXES(DesktopBackgroundControllerTest, GetMaxDisplaySize); |
@@ -144,9 +149,17 @@ class ASH_EXPORT DesktopBackgroundController |
// 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 exacltly duplicate request received) |
Daniel Erat
2014/03/24 16:25:48
nit: s/exacltly/exactly/
Alexander Alekseev
2014/03/24 17:33:43
Done.
|
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_|. |
+ // (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 +203,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 +243,11 @@ class ASH_EXPORT DesktopBackgroundController |
int wallpaper_reload_delay_; |
+ base::FilePath customized_default_wallpaper_file_small_; |
+ base::FilePath customized_default_wallpaper_file_large_; |
+ |
+ bool customization_applied_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
}; |