Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: components/wallpaper/wallpaper_manager_base.h

Issue 2572793003: [Chrome OS] Implement the device wallpaper policy. (Closed)
Patch Set: Rebase. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/user_manager/user.h ('k') | components/wallpaper/wallpaper_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/wallpaper/wallpaper_manager_base.h
diff --git a/components/wallpaper/wallpaper_manager_base.h b/components/wallpaper/wallpaper_manager_base.h
index a734d2f5f03983d4a2df2f4029a483cd142328fb..cd18065d39ede8ddab216dfc16ef01a27ab21979 100644
--- a/components/wallpaper/wallpaper_manager_base.h
+++ b/components/wallpaper/wallpaper_manager_base.h
@@ -354,6 +354,14 @@ class WALLPAPER_EXPORT WallpaperManagerBase {
// Ruturns files identifier for the |account_id|.
virtual WallpaperFilesId GetFilesId(const AccountId& account_id) const = 0;
+ // If the device is enterprise managed and we're at the login screen, set the
+ // device wallpaper as the login screen wallpaper. If the device is enterprise
+ // managed and we're in a user session, only set the device wallpaper if there
+ // is no user policy wallpaper and the user hasn't changed the default or the
+ // device wallpaper. Returns true if the device wallpaper should be set as the
+ // wallpaper, otherwise returns false.
+ virtual bool SetDeviceWallpaperIfApplicable(const AccountId& account_id) = 0;
+
protected:
friend class TestApi;
friend class WallpaperManagerBrowserTest;
@@ -402,7 +410,8 @@ class WALLPAPER_EXPORT WallpaperManagerBase {
gfx::ImageSkia* large_wallpaper_image);
// Initialize wallpaper for the specified user to default and saves this
- // settings in local state.
+ // settings in local state. Note if the device policy controlled wallpaper
+ // exists, use the device wallpaper as the default wallpaper.
virtual void InitInitialUserWallpaper(const AccountId& account_id,
bool is_persistent);
@@ -472,6 +481,17 @@ class WALLPAPER_EXPORT WallpaperManagerBase {
virtual bool GetUserWallpaperInfo(const AccountId& account_id,
WallpaperInfo* info) const = 0;
+ // Returns true if the device wallpaper should be set for the account.
+ virtual bool ShouldSetDeviceWallpaper(const AccountId& account_id,
+ std::string* url,
+ std::string* hash) = 0;
+
+ // Returns the file directory where the downloaded device wallpaper is saved.
+ virtual base::FilePath GetDeviceWallpaperDir() = 0;
+
+ // Returns the full path for the downloaded device wallpaper.
+ virtual base::FilePath GetDeviceWallpaperFilePath() = 0;
+
// Sets wallpaper to the decoded wallpaper if |update_wallpaper| is true.
// Otherwise, cache wallpaper to memory if not logged in. (Takes a UserImage
// because that's the callback interface provided by UserImageLoader.)
« no previous file with comments | « components/user_manager/user.h ('k') | components/wallpaper/wallpaper_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698