Chromium Code Reviews| 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..5077d194f6a00e72c7a53750b3e637c905517c77 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; |
|
Daniel Erat
2014/04/14 15:26:15
nit: alphabetize these
Alexander Alekseev
2014/04/15 01:57:16
Done.
|
| namespace system { |
| class StatisticsProvider; |
| @@ -179,6 +180,14 @@ class ServicesCustomizationDocument : public CustomizationDocument, |
| // Remove instance of ServicesCustomizationDocument for tests. |
| static void ShutdownForTesting(); |
| + // 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(); |
| + |
| + // This is called by CustomizationWallpaperDownloader to destroy self. |
| + void DestroyWallpaperDownloader(); |
| + |
| private: |
| friend struct DefaultSingletonTraits<ServicesCustomizationDocument>; |
| @@ -237,6 +246,23 @@ class ServicesCustomizationDocument : public CustomizationDocument, |
| const std::string& locale, |
| const base::DictionaryValue& root) const; |
| + // Start download of wallpaper image if need. |
|
Daniel Erat
2014/04/14 15:26:15
nit: s/need/needed/
Alexander Alekseev
2014/04/15 01:57:16
Done.
|
| + 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>); |
|
Daniel Erat
2014/04/14 15:26:15
name this parameter
Alexander Alekseev
2014/04/15 01:57:16
Done.
|
| + |
| + // 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 OnCustomizedWallpaperDownloaded(const GURL& wallpaper_url); |
| + |
| // Services customization manifest URL. |
| GURL url_; |
| @@ -258,6 +284,8 @@ class ServicesCustomizationDocument : public CustomizationDocument, |
| // Weak factory for callbacks. |
| base::WeakPtrFactory<ServicesCustomizationDocument> weak_ptr_factory_; |
| + scoped_ptr<CustomizationWallpaperDownloader> wallpaper_downloader_; |
|
Daniel Erat
2014/04/14 15:26:15
weak_ptr_factory_ should come last in the class de
Alexander Alekseev
2014/04/15 01:57:16
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); |
| }; |