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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WALLPAPER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/ref_counted_memory.h" 12 #include "base/memory/ref_counted_memory.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/sequenced_worker_pool.h" 14 #include "base/threading/sequenced_worker_pool.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "base/timer.h" 16 #include "base/timer.h"
17 #include "chrome/browser/chromeos/login/user.h" 17 #include "chrome/browser/chromeos/login/user.h"
18 #include "chrome/browser/chromeos/login/user_image.h" 18 #include "chrome/browser/chromeos/login/user_image.h"
19 #include "chrome/browser/chromeos/login/user_image_loader.h" 19 #include "chrome/browser/chromeos/login/user_image_loader.h"
20 #include "chrome/browser/chromeos/system/timezone_settings.h" 20 #include "chrome/browser/chromeos/system/timezone_settings.h"
21 #include "chromeos/dbus/root_power_manager_observer.h" 21 #include "chromeos/dbus/root_power_manager_observer.h"
22 #include "content/public/browser/notification_observer.h" 22 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
24 #include "ui/gfx/image/image_skia.h" 24 #include "ui/gfx/image/image_skia.h"
25 #include "unicode/timezone.h" 25 #include "unicode/timezone.h"
26 26
27 class PrefService; 27 class PrefServiceSimple;
28 28
29 namespace base { 29 namespace base {
30 class SequencedTaskRunner; 30 class SequencedTaskRunner;
31 } 31 }
32 32
33 namespace chromeos { 33 namespace chromeos {
34 34
35 struct WallpaperInfo { 35 struct WallpaperInfo {
36 // Online wallpaper URL or file name of migrated wallpaper. 36 // Online wallpaper URL or file name of migrated wallpaper.
37 std::string file; 37 std::string file;
(...skipping 20 matching lines...) Expand all
58 // OS device. 58 // OS device.
59 class WallpaperManager: public system::TimezoneSettings::Observer, 59 class WallpaperManager: public system::TimezoneSettings::Observer,
60 public chromeos::RootPowerManagerObserver, 60 public chromeos::RootPowerManagerObserver,
61 public content::NotificationObserver { 61 public content::NotificationObserver {
62 public: 62 public:
63 static WallpaperManager* Get(); 63 static WallpaperManager* Get();
64 64
65 WallpaperManager(); 65 WallpaperManager();
66 66
67 // Registers wallpaper manager preferences. 67 // Registers wallpaper manager preferences.
68 static void RegisterPrefs(PrefService* local_state); 68 static void RegisterPrefs(PrefServiceSimple* local_state);
69 69
70 // Adds RootPowerManagerClient and TimeZoneSettings observers. It needs to be 70 // Adds RootPowerManagerClient and TimeZoneSettings observers. It needs to be
71 // added after RootPowerManagerClient has been initialized. 71 // added after RootPowerManagerClient has been initialized.
72 void AddObservers(); 72 void AddObservers();
73 73
74 // Loads wallpaper asynchronously if the current wallpaper is not the 74 // Loads wallpaper asynchronously if the current wallpaper is not the
75 // wallpaper of logged in user. 75 // wallpaper of logged in user.
76 void EnsureLoggedInUserWallpaperLoaded(); 76 void EnsureLoggedInUserWallpaperLoaded();
77 77
78 // Clears ONLINE and CUSTOM wallpaper cache. 78 // Clears ONLINE and CUSTOM wallpaper cache.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 content::NotificationRegistrar registrar_; 298 content::NotificationRegistrar registrar_;
299 299
300 base::OneShotTimer<WallpaperManager> timer_; 300 base::OneShotTimer<WallpaperManager> timer_;
301 301
302 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); 302 DISALLOW_COPY_AND_ASSIGN(WallpaperManager);
303 }; 303 };
304 304
305 } // namespace chromeos 305 } // namespace chromeos
306 306
307 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ 307 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698