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

Side by Side Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h

Issue 1794323003: Make user_manager::UserImage non-copyable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 9 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Returns modifiable PendingWallpaper. 146 // Returns modifiable PendingWallpaper.
147 // Returns pending_inactive_ or creates new PendingWallpaper if necessary. 147 // Returns pending_inactive_ or creates new PendingWallpaper if necessary.
148 PendingWallpaper* GetPendingWallpaper(const AccountId& account_id, 148 PendingWallpaper* GetPendingWallpaper(const AccountId& account_id,
149 bool delayed); 149 bool delayed);
150 150
151 // This is called by PendingWallpaper when load is finished. 151 // This is called by PendingWallpaper when load is finished.
152 void RemovePendingWallpaperFromList(PendingWallpaper* pending); 152 void RemovePendingWallpaperFromList(PendingWallpaper* pending);
153 153
154 // Set wallpaper to |user_image| controlled by policy. (Takes a UserImage 154 // Set wallpaper to |user_image| controlled by policy. (Takes a UserImage
155 // because that's the callback interface provided by UserImageLoader.) 155 // because that's the callback interface provided by UserImageLoader.)
156 void SetPolicyControlledWallpaper(const AccountId& account_id, 156 void SetPolicyControlledWallpaper(
157 const user_manager::UserImage& user_image); 157 const AccountId& account_id,
158 scoped_ptr<user_manager::UserImage> user_image);
158 159
159 // Calls SetCustomWallpaper() with |wallpaper_files_id_str| received from 160 // Calls SetCustomWallpaper() with |wallpaper_files_id_str| received from
160 // cryptohome. 161 // cryptohome.
161 void SetCustomWallpaperOnSanitizedUsername( 162 void SetCustomWallpaperOnSanitizedUsername(
162 const AccountId& account_id, 163 const AccountId& account_id,
163 const gfx::ImageSkia& image, 164 const gfx::ImageSkia& image,
164 bool update_wallpaper, 165 bool update_wallpaper,
165 bool cryptohome_success, 166 bool cryptohome_success,
166 const std::string& wallpaper_files_id_str); 167 const std::string& wallpaper_files_id_str);
167 168
168 // WallpaperManagerBase overrides: 169 // WallpaperManagerBase overrides:
169 void InitializeRegisteredDeviceWallpaper() override; 170 void InitializeRegisteredDeviceWallpaper() override;
170 bool GetUserWallpaperInfo(const AccountId& account_id, 171 bool GetUserWallpaperInfo(const AccountId& account_id,
171 wallpaper::WallpaperInfo* info) const override; 172 wallpaper::WallpaperInfo* info) const override;
172 void OnWallpaperDecoded(const AccountId& account_id, 173 void OnWallpaperDecoded(
173 wallpaper::WallpaperLayout layout, 174 const AccountId& account_id,
174 bool update_wallpaper, 175 wallpaper::WallpaperLayout layout,
175 wallpaper::MovableOnDestroyCallbackHolder on_finish, 176 bool update_wallpaper,
176 const user_manager::UserImage& user_image) override; 177 wallpaper::MovableOnDestroyCallbackHolder on_finish,
178 scoped_ptr<user_manager::UserImage> user_image) override;
177 void StartLoad(const AccountId& account_id, 179 void StartLoad(const AccountId& account_id,
178 const wallpaper::WallpaperInfo& info, 180 const wallpaper::WallpaperInfo& info,
179 bool update_wallpaper, 181 bool update_wallpaper,
180 const base::FilePath& wallpaper_path, 182 const base::FilePath& wallpaper_path,
181 wallpaper::MovableOnDestroyCallbackHolder on_finish) override; 183 wallpaper::MovableOnDestroyCallbackHolder on_finish) override;
182 void SetCustomizedDefaultWallpaperAfterCheck( 184 void SetCustomizedDefaultWallpaperAfterCheck(
183 const GURL& wallpaper_url, 185 const GURL& wallpaper_url,
184 const base::FilePath& downloaded_file, 186 const base::FilePath& downloaded_file,
185 scoped_ptr<CustomizedWallpaperRescaledFiles> rescaled_files) override; 187 scoped_ptr<CustomizedWallpaperRescaledFiles> rescaled_files) override;
186 void OnCustomizedDefaultWallpaperResized( 188 void OnCustomizedDefaultWallpaperResized(
187 const GURL& wallpaper_url, 189 const GURL& wallpaper_url,
188 scoped_ptr<CustomizedWallpaperRescaledFiles> rescaled_files, 190 scoped_ptr<CustomizedWallpaperRescaledFiles> rescaled_files,
189 scoped_ptr<bool> success, 191 scoped_ptr<bool> success,
190 scoped_ptr<gfx::ImageSkia> small_wallpaper_image, 192 scoped_ptr<gfx::ImageSkia> small_wallpaper_image,
191 scoped_ptr<gfx::ImageSkia> large_wallpaper_image) override; 193 scoped_ptr<gfx::ImageSkia> large_wallpaper_image) override;
192 void SetDefaultWallpaperPathsFromCommandLine( 194 void SetDefaultWallpaperPathsFromCommandLine(
193 base::CommandLine* command_line) override; 195 base::CommandLine* command_line) override;
194 void OnDefaultWallpaperDecoded( 196 void OnDefaultWallpaperDecoded(
195 const base::FilePath& path, 197 const base::FilePath& path,
196 const wallpaper::WallpaperLayout layout, 198 const wallpaper::WallpaperLayout layout,
197 scoped_ptr<user_manager::UserImage>* result, 199 scoped_ptr<user_manager::UserImage>* result,
198 wallpaper::MovableOnDestroyCallbackHolder on_finish, 200 wallpaper::MovableOnDestroyCallbackHolder on_finish,
199 const user_manager::UserImage& user_image) override; 201 scoped_ptr<user_manager::UserImage> user_image) override;
200 void StartLoadAndSetDefaultWallpaper( 202 void StartLoadAndSetDefaultWallpaper(
201 const base::FilePath& path, 203 const base::FilePath& path,
202 const wallpaper::WallpaperLayout layout, 204 const wallpaper::WallpaperLayout layout,
203 wallpaper::MovableOnDestroyCallbackHolder on_finish, 205 wallpaper::MovableOnDestroyCallbackHolder on_finish,
204 scoped_ptr<user_manager::UserImage>* result_out) override; 206 scoped_ptr<user_manager::UserImage>* result_out) override;
205 void SetDefaultWallpaperPath( 207 void SetDefaultWallpaperPath(
206 const base::FilePath& customized_default_wallpaper_file_small, 208 const base::FilePath& customized_default_wallpaper_file_small,
207 scoped_ptr<gfx::ImageSkia> small_wallpaper_image, 209 scoped_ptr<gfx::ImageSkia> small_wallpaper_image,
208 const base::FilePath& customized_default_wallpaper_file_large, 210 const base::FilePath& customized_default_wallpaper_file_large,
209 scoped_ptr<gfx::ImageSkia> large_wallpaper_image) override; 211 scoped_ptr<gfx::ImageSkia> large_wallpaper_image) override;
(...skipping 13 matching lines...) Expand all
223 225
224 content::NotificationRegistrar registrar_; 226 content::NotificationRegistrar registrar_;
225 227
226 base::WeakPtrFactory<WallpaperManager> weak_factory_; 228 base::WeakPtrFactory<WallpaperManager> weak_factory_;
227 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); 229 DISALLOW_COPY_AND_ASSIGN(WallpaperManager);
228 }; 230 };
229 231
230 } // namespace chromeos 232 } // namespace chromeos
231 233
232 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ 234 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698