| Index: chrome/browser/chromeos/customization_document.h
|
| diff --git a/chrome/browser/chromeos/customization_document.h b/chrome/browser/chromeos/customization_document.h
|
| index 1c0ea8fcea6290bae9a6409e71e68219474bb138..fdfa3bb6f429ed6a2083617deb899a250b848a32 100644
|
| --- a/chrome/browser/chromeos/customization_document.h
|
| +++ b/chrome/browser/chromeos/customization_document.h
|
| @@ -42,6 +42,7 @@ void Test__InitStartupCustomizationDocument(const std::string& manifest);
|
|
|
| namespace chromeos {
|
|
|
| +class CustomizationWallpaperDownloader;
|
| class ServicesCustomizationExternalLoader;
|
|
|
| namespace system {
|
| @@ -179,6 +180,12 @@ class ServicesCustomizationDocument : public CustomizationDocument,
|
| // Remove instance of ServicesCustomizationDocument for tests.
|
| static void ShutdownForTesting();
|
|
|
| + // These methods are also called by WallpaperManager to get "global default"
|
| + // customized wallpaper path (and to init default wallpaper path from it)
|
| + // before first wallpaper is shown.
|
| + static base::FilePath GetCustomizedWallpaperCacheDir();
|
| + static base::FilePath GetCustomizedWallpaperDownloadedFileName();
|
| +
|
| private:
|
| friend struct DefaultSingletonTraits<ServicesCustomizationDocument>;
|
|
|
| @@ -237,6 +244,24 @@ class ServicesCustomizationDocument : public CustomizationDocument,
|
| const std::string& locale,
|
| const base::DictionaryValue& root) const;
|
|
|
| + // Start download of wallpaper image if needed.
|
| + void StartOEMWallpaperDownload(const GURL& wallpaper_url);
|
| +
|
| + // Check that current customized wallpaper cache exists and matches manifest.
|
| + // Start wallpaper download if needed.
|
| + void CheckAndApplyWallpaper();
|
| +
|
| + // Intermediate function to pass the result of PathExists to ApplyWallpaper.
|
| + void OnCheckedWallpaperCacheExists(scoped_ptr<bool> exists);
|
| +
|
| + // Called after downloaded wallpaper has been checked.
|
| + void ApplyWallpaper(bool default_wallpaper_file_exists);
|
| +
|
| + // Set Shell default wallpaper to customized.
|
| + // It's wrapped as a callback and passed as a parameter to
|
| + // CustomizationWallpaperDownloader.
|
| + void OnOEMWallpaperDownloaded(bool success, const GURL& wallpaper_url);
|
| +
|
| // Services customization manifest URL.
|
| GURL url_;
|
|
|
| @@ -255,6 +280,8 @@ class ServicesCustomizationDocument : public CustomizationDocument,
|
| // Known external loaders.
|
| ExternalLoaders external_loaders_;
|
|
|
| + scoped_ptr<CustomizationWallpaperDownloader> wallpaper_downloader_;
|
| +
|
| // Weak factory for callbacks.
|
| base::WeakPtrFactory<ServicesCustomizationDocument> weak_ptr_factory_;
|
|
|
|
|