| 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 ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
| 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 ASH_EXPORT extern const int kLargeWallpaperMaxWidth; | 57 ASH_EXPORT extern const int kLargeWallpaperMaxWidth; |
| 58 ASH_EXPORT extern const int kLargeWallpaperMaxHeight; | 58 ASH_EXPORT extern const int kLargeWallpaperMaxHeight; |
| 59 | 59 |
| 60 class DesktopBackgroundControllerObserver; | 60 class DesktopBackgroundControllerObserver; |
| 61 | 61 |
| 62 // Loads selected desktop wallpaper from file system asynchronously and updates | 62 // Loads selected desktop wallpaper from file system asynchronously and updates |
| 63 // background layer if loaded successfully. | 63 // background layer if loaded successfully. |
| 64 class ASH_EXPORT DesktopBackgroundController : public aura::WindowObserver { | 64 class ASH_EXPORT DesktopBackgroundController : public aura::WindowObserver { |
| 65 public: | 65 public: |
| 66 enum BackgroundMode { | 66 enum BackgroundMode { |
| 67 BACKGROUND_NONE, |
| 67 BACKGROUND_IMAGE, | 68 BACKGROUND_IMAGE, |
| 68 BACKGROUND_SOLID_COLOR | 69 BACKGROUND_SOLID_COLOR |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 DesktopBackgroundController(); | 72 DesktopBackgroundController(); |
| 72 virtual ~DesktopBackgroundController(); | 73 virtual ~DesktopBackgroundController(); |
| 73 | 74 |
| 74 // Gets the desktop background mode. | 75 // Gets the desktop background mode. |
| 75 BackgroundMode desktop_background_mode() const { | 76 BackgroundMode desktop_background_mode() const { |
| 76 return desktop_background_mode_; | 77 return desktop_background_mode_; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 scoped_refptr<WallpaperLoader> wallpaper_loader_; | 186 scoped_refptr<WallpaperLoader> wallpaper_loader_; |
| 186 | 187 |
| 187 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; | 188 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; |
| 188 | 189 |
| 189 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); | 190 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
| 190 }; | 191 }; |
| 191 | 192 |
| 192 } // namespace ash | 193 } // namespace ash |
| 193 | 194 |
| 194 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 195 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
| OLD | NEW |