OLD | NEW |
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_BACKGROUND_DESKTOP_BACKGROUND_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BACKGROUND_DESKTOP_BACKGROUND_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_BACKGROUND_DESKTOP_BACKGROUND_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_BACKGROUND_DESKTOP_BACKGROUND_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
11 | 11 |
| 12 namespace ash { |
| 13 class UserWallpaperDelegate; |
| 14 } |
| 15 |
12 namespace chromeos { | 16 namespace chromeos { |
13 | 17 |
| 18 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate(); |
| 19 |
14 // Listens for background change events and passes them to the Aura shell's | 20 // Listens for background change events and passes them to the Aura shell's |
15 // DesktopBackgroundController class. | 21 // DesktopBackgroundController class. |
16 class DesktopBackgroundObserver : public content::NotificationObserver{ | 22 class DesktopBackgroundObserver : public content::NotificationObserver { |
17 public: | 23 public: |
18 DesktopBackgroundObserver(); | 24 DesktopBackgroundObserver(); |
19 virtual ~DesktopBackgroundObserver(); | 25 virtual ~DesktopBackgroundObserver(); |
20 | 26 |
21 private: | 27 private: |
22 // Returns the index of user selected wallpaper from a default wallpaper list. | |
23 int GetUserWallpaperIndex(); | |
24 | 28 |
25 // content::NotificationObserver implementation. | 29 // content::NotificationObserver implementation. |
26 virtual void Observe(int type, | 30 virtual void Observe(int type, |
27 const content::NotificationSource& source, | 31 const content::NotificationSource& source, |
28 const content::NotificationDetails& details) OVERRIDE; | 32 const content::NotificationDetails& details) OVERRIDE; |
29 | 33 |
30 content::NotificationRegistrar registrar_; | 34 content::NotificationRegistrar registrar_; |
31 | 35 |
32 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundObserver); | 36 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundObserver); |
33 }; | 37 }; |
34 | 38 |
35 } // namespace chromeos | 39 } // namespace chromeos |
36 #endif // CHROME_BROWSER_CHROMEOS_BACKGROUND_DESKTOP_BACKGROUND_OBSERVER_H_ | 40 #endif // CHROME_BROWSER_CHROMEOS_BACKGROUND_DESKTOP_BACKGROUND_OBSERVER_H_ |
OLD | NEW |