| Index: chrome/browser/chromeos/customization_document.h
|
| diff --git a/chrome/browser/chromeos/customization_document.h b/chrome/browser/chromeos/customization_document.h
|
| index 95885fc9439d3f3996a4f40ac9bca19483d77fc1..f1a2528a99c6da3a107a53e817749619a14a8757 100644
|
| --- a/chrome/browser/chromeos/customization_document.h
|
| +++ b/chrome/browser/chromeos/customization_document.h
|
| @@ -43,6 +43,7 @@ void Test__InitStartupCustomizationDocument(const std::string& manifest);
|
| namespace chromeos {
|
|
|
| class ServicesCustomizationExternalLoader;
|
| +class CustomizationWallpaperDownloader;
|
|
|
| namespace system {
|
| class StatisticsProvider;
|
| @@ -177,6 +178,18 @@ class ServicesCustomizationDocument : public CustomizationDocument,
|
| network_delay_ = base::TimeDelta();
|
| }
|
|
|
| + // This is also used by WallpaperManager to set customized wallpaper path
|
| + // to global default before first wallpaper is shown.
|
| + static base::FilePath GetCustomizedWallpaperCacheDir();
|
| + static base::FilePath GetCustomizedWallpaperDownloadedFileName();
|
| +
|
| + // Set Shell default wallpaper to customized.
|
| + // Called by CustomizationWallpaperDownloader.
|
| + static void OnCustomizedWallpaperDownloaded(const GURL& wallpaper_url);
|
| +
|
| + // This is called by CustomizationWallpaperDownloader to destroy self.
|
| + void DestroyWallpaperDownloader();
|
| +
|
| private:
|
| friend struct DefaultSingletonTraits<ServicesCustomizationDocument>;
|
|
|
| @@ -235,6 +248,18 @@ class ServicesCustomizationDocument : public CustomizationDocument,
|
| const std::string& locale,
|
| const base::DictionaryValue& root) const;
|
|
|
| + // Start download of wallpaper image if need.
|
| + void StartOEMWallpaperDownload(const GURL& wallpaper_url);
|
| +
|
| + // Check downloaded wallpaper and start download if needed.
|
| + void CheckAndApplyWallpaper();
|
| +
|
| + // Intermediate function to pass the result of PathExists to ApplyWallpaper.
|
| + void OnCheckedWallpaperCacheExists(scoped_ptr<bool>);
|
| +
|
| + // Called after downloaded wallpaper has been checked.
|
| + void ApplyWallpaper(bool default_wallpaper_file_exists);
|
| +
|
| // Services customization manifest URL.
|
| GURL url_;
|
|
|
| @@ -256,6 +281,8 @@ class ServicesCustomizationDocument : public CustomizationDocument,
|
| // Weak factory for callbacks.
|
| base::WeakPtrFactory<ServicesCustomizationDocument> weak_ptr_factory_;
|
|
|
| + scoped_ptr<CustomizationWallpaperDownloader> wallpaper_downloader_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument);
|
| };
|
|
|
|
|