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..8a0066cda9b1c7448a9c2855a0fb47f1b9d5b684 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,8 +178,14 @@ class ServicesCustomizationDocument : public CustomizationDocument, |
network_delay_ = base::TimeDelta(); |
} |
+ // This is also used by Wallpaper manager to set customized wallpaper path |
Daniel Erat
2014/03/25 21:58:29
nit: s/Wallpaper manager/WallpaperManager/
Alexander Alekseev
2014/03/27 00:28:37
Done.
|
+ // to global default before first wallpaper was shown. |
Daniel Erat
2014/03/25 21:58:29
nit: s/was/is/
Alexander Alekseev
2014/03/27 00:28:37
Done.
|
+ static base::FilePath GetCustomizedWallpaperCacheDir(); |
+ static base::FilePath GetCustomizedWallpaperDownloadedFileName(); |
+ |
private: |
friend struct DefaultSingletonTraits<ServicesCustomizationDocument>; |
+ friend class CustomizationWallpaperDownloader; |
typedef std::vector<base::WeakPtr<ServicesCustomizationExternalLoader> > |
ExternalLoaders; |
@@ -235,6 +242,24 @@ class ServicesCustomizationDocument : public CustomizationDocument, |
const std::string& locale, |
const base::DictionaryValue& root) const; |
+ // Set Shell default wallpaper to customized. |
+ static void SetDefaultWallpaperPath(const GURL& wallpaper_url); |
+ |
+ // This is called by CustomizationWallpaperDownloader to destroy self. |
+ static void DestroyWallpaperDownloader(); |
+ |
+ // 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); |
}; |