| Index: chrome/browser/chromeos/login/wallpaper_manager.h
|
| diff --git a/chrome/browser/chromeos/login/wallpaper_manager.h b/chrome/browser/chromeos/login/wallpaper_manager.h
|
| index 3a6a0ffce59eec156a8f06b148e0f9ed6b2f5c08..ac8379cebdb3d9932dc1192cc17e095add62c614 100644
|
| --- a/chrome/browser/chromeos/login/wallpaper_manager.h
|
| +++ b/chrome/browser/chromeos/login/wallpaper_manager.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/memory/ref_counted_memory.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| +#include "base/observer_list.h"
|
| #include "base/threading/sequenced_worker_pool.h"
|
| #include "base/time/time.h"
|
| #include "chrome/browser/chromeos/login/user.h"
|
| @@ -80,6 +81,12 @@ class WallpaperManager: public content::NotificationObserver {
|
| DISALLOW_COPY_AND_ASSIGN(TestApi);
|
| };
|
|
|
| + class Observer {
|
| + public:
|
| + virtual ~Observer() {}
|
| + virtual void OnWallpaperAnimationFinished(const std::string& email) = 0;
|
| + };
|
| +
|
| static WallpaperManager* Get();
|
|
|
| WallpaperManager();
|
| @@ -188,6 +195,12 @@ class WallpaperManager: public content::NotificationObserver {
|
| // current display's resolution.
|
| void UpdateWallpaper();
|
|
|
| + // Adds given observer to the list.
|
| + void AddObserver(Observer* observer);
|
| +
|
| + // Removes given observer from the list.
|
| + void RemoveObserver(Observer* observer);
|
| +
|
| private:
|
| friend class TestApi;
|
| friend class WallpaperManagerBrowserTest;
|
| @@ -306,6 +319,9 @@ class WallpaperManager: public content::NotificationObserver {
|
| bool update_wallpaper,
|
| const base::FilePath& wallpaper_path);
|
|
|
| + // Notify all registed observers.
|
| + void NotifyAnimationFinished();
|
| +
|
| // The number of loaded wallpapers.
|
| int loaded_wallpapers_;
|
|
|
| @@ -342,6 +358,8 @@ class WallpaperManager: public content::NotificationObserver {
|
|
|
| content::NotificationRegistrar registrar_;
|
|
|
| + ObserverList<Observer> observers_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WallpaperManager);
|
| };
|
|
|
|
|