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

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

Issue 23494053: Remove NOTIFICATION_SYSTEM_SETTING_CHANGED, switch CrosSettings to base::CallbackRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trailing space Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted_memory.h" 12 #include "base/memory/ref_counted_memory.h"
13 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "base/threading/sequenced_worker_pool.h" 15 #include "base/threading/sequenced_worker_pool.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "chrome/browser/chromeos/login/user.h" 17 #include "chrome/browser/chromeos/login/user.h"
17 #include "chrome/browser/chromeos/login/user_image.h" 18 #include "chrome/browser/chromeos/login/user_image.h"
18 #include "chrome/browser/chromeos/login/user_image_loader.h" 19 #include "chrome/browser/chromeos/login/user_image_loader.h"
20 #include "chrome/browser/chromeos/settings/cros_settings.h"
19 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
21 #include "third_party/icu/source/i18n/unicode/timezone.h" 23 #include "third_party/icu/source/i18n/unicode/timezone.h"
22 #include "ui/gfx/image/image_skia.h" 24 #include "ui/gfx/image/image_skia.h"
23 25
24 class CommandLine; 26 class CommandLine;
25 class PrefRegistrySimple; 27 class PrefRegistrySimple;
26 28
27 namespace base { 29 namespace base {
28 class SequencedTaskRunner; 30 class SequencedTaskRunner;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void SaveWallpaperInternal(const base::FilePath& path, const char* data, 280 void SaveWallpaperInternal(const base::FilePath& path, const char* data,
279 int size); 281 int size);
280 282
281 // Starts to load wallpaper at |wallpaper_path|. If |wallpaper_path| is the 283 // Starts to load wallpaper at |wallpaper_path|. If |wallpaper_path| is the
282 // same as |current_wallpaper_path_|, do nothing. Must be called on UI thread. 284 // same as |current_wallpaper_path_|, do nothing. Must be called on UI thread.
283 void StartLoad(const std::string& email, 285 void StartLoad(const std::string& email,
284 const WallpaperInfo& info, 286 const WallpaperInfo& info,
285 bool update_wallpaper, 287 bool update_wallpaper,
286 const base::FilePath& wallpaper_path); 288 const base::FilePath& wallpaper_path);
287 289
288 // True if wallpaper manager is not observering other objects.
289 bool no_observers_;
290
291 // The number of loaded wallpapers. 290 // The number of loaded wallpapers.
292 int loaded_wallpapers_; 291 int loaded_wallpapers_;
293 292
294 // Sequence token associated with wallpaper operations. 293 // Sequence token associated with wallpaper operations.
295 base::SequencedWorkerPool::SequenceToken sequence_token_; 294 base::SequencedWorkerPool::SequenceToken sequence_token_;
296 295
297 // Wallpaper sequenced task runner. 296 // Wallpaper sequenced task runner.
298 scoped_refptr<base::SequencedTaskRunner> task_runner_; 297 scoped_refptr<base::SequencedTaskRunner> task_runner_;
299 298
300 // The file path of current loaded/loading custom/online wallpaper. 299 // The file path of current loaded/loading custom/online wallpaper.
301 base::FilePath current_wallpaper_path_; 300 base::FilePath current_wallpaper_path_;
302 301
303 // Loads user wallpaper from its file. 302 // Loads user wallpaper from its file.
304 scoped_refptr<UserImageLoader> wallpaper_loader_; 303 scoped_refptr<UserImageLoader> wallpaper_loader_;
305 304
306 // Logged-in user wallpaper information. 305 // Logged-in user wallpaper information.
307 WallpaperInfo current_user_wallpaper_info_; 306 WallpaperInfo current_user_wallpaper_info_;
308 307
309 // If non-NULL, used in place of the real command line. 308 // If non-NULL, used in place of the real command line.
310 CommandLine* command_line_for_testing_; 309 CommandLine* command_line_for_testing_;
311 310
312 // Caches wallpapers of users. Accessed only on UI thread. 311 // Caches wallpapers of users. Accessed only on UI thread.
313 CustomWallpaperMap wallpaper_cache_; 312 CustomWallpaperMap wallpaper_cache_;
314 313
315 // The last selected user on user pod row. 314 // The last selected user on user pod row.
316 std::string last_selected_user_; 315 std::string last_selected_user_;
317 316
318 bool should_cache_wallpaper_; 317 bool should_cache_wallpaper_;
319 318
319 scoped_ptr<CrosSettings::ObserverSubscription>
320 show_user_name_on_signin_subscription_;
321
320 base::WeakPtrFactory<WallpaperManager> weak_factory_; 322 base::WeakPtrFactory<WallpaperManager> weak_factory_;
321 323
322 content::NotificationRegistrar registrar_; 324 content::NotificationRegistrar registrar_;
323 325
324 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); 326 DISALLOW_COPY_AND_ASSIGN(WallpaperManager);
325 }; 327 };
326 328
327 } // namespace chromeos 329 } // namespace chromeos
328 330
329 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ 331 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/version_info_updater.cc ('k') | chrome/browser/chromeos/login/wallpaper_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698