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..5426e0f47292a72f39e329189faa60835d220663 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,11 @@ class ServicesCustomizationDocument : public CustomizationDocument, |
// Remove instance of ServicesCustomizationDocument for tests. |
static void ShutdownForTesting(); |
+ // This is also used by WallpaperManager to set customized wallpaper path |
Nikita (slow)
2014/04/15 12:39:24
Comments needs to be updated. It says that these m
Alexander Alekseev
2014/04/15 22:47:31
Done.
|
+ // to global default before first wallpaper is shown. |
+ static base::FilePath GetCustomizedWallpaperCacheDir(); |
+ static base::FilePath GetCustomizedWallpaperDownloadedFileName(); |
+ |
private: |
friend struct DefaultSingletonTraits<ServicesCustomizationDocument>; |
@@ -237,6 +243,23 @@ 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 downloaded wallpaper and start download if needed. |
Nikita (slow)
2014/04/15 12:39:24
nit:
Alexander Alekseev
2014/04/15 22:47:31
If we do not have final two rescaled wallpaper fil
|
+ void CheckAndApplyWallpaper(); |
Nikita (slow)
2014/04/15 12:39:24
nit: What does "check" mean in this context?
Alexander Alekseev
2014/04/15 22:47:31
Check that current customized wallpaper cache exis
|
+ |
+ // 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 OnCustomizedWallpaperDownloaded(bool success, const GURL& wallpaper_url); |
Nikita (slow)
2014/04/15 12:39:24
nit: Rename to OnOEMWallpaperDownloaded() to match
Alexander Alekseev
2014/04/15 22:47:31
Done.
|
+ |
// Services customization manifest URL. |
GURL url_; |
@@ -255,6 +278,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_; |