OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | |
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | |
7 #pragma once | |
8 | |
9 #include "ash/ash_export.h" | |
10 #include "base/basictypes.h" | |
11 #include "content/public/browser/notification_observer.h" | |
Ben Goodger (Google)
2012/03/08 16:35:01
Ash can't depend on content.
bshe
2012/03/08 19:55:48
I moved the observer code to chrome/browser/chrome
| |
12 #include "content/public/browser/notification_registrar.h" | |
13 #include "third_party/skia/include/core/SkBitmap.h" | |
14 | |
15 namespace ash { | |
16 | |
17 // A class to listen for login and desktop background change events and set the | |
18 // corresponding default wallpaper in Aura shell. | |
19 class ASH_EXPORT DesktopBackgroundController : | |
20 public content::NotificationObserver { | |
21 public: | |
22 DesktopBackgroundController(); | |
23 virtual ~DesktopBackgroundController(); | |
24 | |
25 // Change the desktop background image to |wallpaper|. | |
26 void OnDesktopBackgroundChange(const SkBitmap& wallpaper); | |
27 | |
28 // Returns the preset default wallpaper. | |
29 const SkBitmap& GetPresetWallpaper(); | |
30 | |
31 // Returns the user selected wallpaper from a default wallpaper list. | |
32 const SkBitmap& GetUserWallpaper(); | |
33 private: | |
34 virtual void Observe(int type, | |
35 const content::NotificationSource& source, | |
36 const content::NotificationDetails& details) OVERRIDE; | |
37 | |
38 content::NotificationRegistrar registrar_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); | |
41 }; | |
42 | |
43 } // namespace ash | |
44 | |
45 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | |
OLD | NEW |