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

Side by Side Diff: components/wallpaper/wallpaper_manager_base.h

Issue 824513003: Standardize usage of virtual/override/final specifiers in components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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
« no previous file with comments | « components/translate/content/renderer/renderer_cld_data_provider.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ 5 #ifndef COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_
6 #define COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ 6 #define COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 int preferred_height, 216 int preferred_height,
217 gfx::ImageSkia* output_skia); 217 gfx::ImageSkia* output_skia);
218 218
219 // Returns custom wallpaper path. Append |sub_dir|, |user_id_hash| and |file| 219 // Returns custom wallpaper path. Append |sub_dir|, |user_id_hash| and |file|
220 // to custom wallpaper directory. 220 // to custom wallpaper directory.
221 static base::FilePath GetCustomWallpaperPath(const char* sub_dir, 221 static base::FilePath GetCustomWallpaperPath(const char* sub_dir,
222 const std::string& user_id_hash, 222 const std::string& user_id_hash,
223 const std::string& file); 223 const std::string& file);
224 224
225 WallpaperManagerBase(); 225 WallpaperManagerBase();
226 virtual ~WallpaperManagerBase(); 226 ~WallpaperManagerBase() override;
227 227
228 // Returns the appropriate wallpaper resolution for all root windows. 228 // Returns the appropriate wallpaper resolution for all root windows.
229 virtual WallpaperResolution GetAppropriateResolution() = 0; 229 virtual WallpaperResolution GetAppropriateResolution() = 0;
230 230
231 virtual void SetCommandLineForTesting(base::CommandLine* command_line); 231 virtual void SetCommandLineForTesting(base::CommandLine* command_line);
232 232
233 // Indicates imminent shutdown, allowing the WallpaperManager to remove any 233 // Indicates imminent shutdown, allowing the WallpaperManager to remove any
234 // observers it has registered. 234 // observers it has registered.
235 virtual void Shutdown() = 0; 235 virtual void Shutdown() = 0;
236 236
237 // Adds PowerManagerClient, TimeZoneSettings and CrosSettings observers. 237 // Adds PowerManagerClient, TimeZoneSettings and CrosSettings observers.
238 virtual void AddObservers() = 0; 238 virtual void AddObservers() = 0;
239 239
240 // Loads wallpaper asynchronously if the current wallpaper is not the 240 // Loads wallpaper asynchronously if the current wallpaper is not the
241 // wallpaper of logged in user. 241 // wallpaper of logged in user.
242 virtual void EnsureLoggedInUserWallpaperLoaded(); 242 virtual void EnsureLoggedInUserWallpaperLoaded();
243 243
244 // Gets wallpaper information of logged in user. 244 // Gets wallpaper information of logged in user.
245 virtual bool GetLoggedInUserWallpaperInfo(WallpaperInfo* info); 245 virtual bool GetLoggedInUserWallpaperInfo(WallpaperInfo* info);
246 246
247 // Initializes wallpaper. If logged in, loads user's wallpaper. If not logged 247 // Initializes wallpaper. If logged in, loads user's wallpaper. If not logged
248 // in, uses a solid color wallpaper. If logged in as a stub user, uses an 248 // in, uses a solid color wallpaper. If logged in as a stub user, uses an
249 // empty wallpaper. 249 // empty wallpaper.
250 virtual void InitializeWallpaper() = 0; 250 virtual void InitializeWallpaper() = 0;
251 251
252 // NotificationObserver overrides: 252 // NotificationObserver overrides:
253 virtual void Observe( 253 void Observe(int type,
254 int type, 254 const content::NotificationSource& source,
255 const content::NotificationSource& source, 255 const content::NotificationDetails& details) override = 0;
256 const content::NotificationDetails& details) override = 0;
257 256
258 // Removes all |user_id| related wallpaper info and saved wallpapers. 257 // Removes all |user_id| related wallpaper info and saved wallpapers.
259 virtual void RemoveUserWallpaperInfo(const std::string& user_id) = 0; 258 virtual void RemoveUserWallpaperInfo(const std::string& user_id) = 0;
260 259
261 // Calls SetCustomWallpaper() with |user_id_hash| received from cryptohome. 260 // Calls SetCustomWallpaper() with |user_id_hash| received from cryptohome.
262 virtual void SetCustomWallpaperOnSanitizedUsername( 261 virtual void SetCustomWallpaperOnSanitizedUsername(
263 const std::string& user_id, 262 const std::string& user_id,
264 const gfx::ImageSkia& image, 263 const gfx::ImageSkia& image,
265 bool update_wallpaper, 264 bool update_wallpaper,
266 bool cryptohome_success, 265 bool cryptohome_success,
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 603
605 base::WeakPtrFactory<WallpaperManagerBase> weak_factory_; 604 base::WeakPtrFactory<WallpaperManagerBase> weak_factory_;
606 605
607 private: 606 private:
608 DISALLOW_COPY_AND_ASSIGN(WallpaperManagerBase); 607 DISALLOW_COPY_AND_ASSIGN(WallpaperManagerBase);
609 }; 608 };
610 609
611 } // namespace chromeos 610 } // namespace chromeos
612 611
613 #endif // COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ 612 #endif // COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « components/translate/content/renderer/renderer_cld_data_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698