Chromium Code Reviews| 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 "ash/desktop_background/desktop_background_resources.h" | 9 #include "ash/desktop_background/desktop_background_resources.h" |
| 10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 | 63 |
| 64 WallpaperLayout GetWallpaperLayout() const; | 64 WallpaperLayout GetWallpaperLayout() const; |
| 65 | 65 |
| 66 // Provides current image on the background, or empty SkBitmap if there is | 66 // Provides current image on the background, or empty SkBitmap if there is |
| 67 // no image, e.g. background is solid color. | 67 // no image, e.g. background is solid color. |
| 68 SkBitmap GetCurrentWallpaperImage(); | 68 SkBitmap GetCurrentWallpaperImage(); |
| 69 | 69 |
| 70 // Initialize root window's background. | 70 // Initialize root window's background. |
| 71 void OnRootWindowAdded(aura::RootWindow* root_window); | 71 void OnRootWindowAdded(aura::RootWindow* root_window); |
| 72 | 72 |
| 73 // Loads default wallpaper at |index| asynchronously but does not set the | |
| 74 // loaded image to current wallpaper. Resource bundle will cache the loaded | |
| 75 // image. | |
| 76 void TriggerCacheDefaultWallpaper(int index); | |
|
Nikita (slow)
2012/08/06 16:36:01
nit: just CacheDefaultWallpaper ?
bshe
2012/08/07 15:18:57
Done.
| |
| 77 | |
| 73 // Loads default wallpaper at |index| asynchronously and sets to current | 78 // Loads default wallpaper at |index| asynchronously and sets to current |
| 74 // wallpaper after loaded. | 79 // wallpaper after loaded. |
| 75 void SetDefaultWallpaper(int index); | 80 void SetDefaultWallpaper(int index); |
| 76 | 81 |
| 77 // Sets the user selected custom wallpaper. Called when user selected a file | 82 // Sets the user selected custom wallpaper. Called when user selected a file |
| 78 // from file system or changed the layout of wallpaper. | 83 // from file system or changed the layout of wallpaper. |
| 79 void SetCustomWallpaper(const gfx::ImageSkia& wallpaper, | 84 void SetCustomWallpaper(const gfx::ImageSkia& wallpaper, |
| 80 WallpaperLayout layout); | 85 WallpaperLayout layout); |
| 81 | 86 |
| 82 // Cancels the current wallpaper loading operation. | 87 // Cancels the current wallpaper loading operation. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 scoped_refptr<WallpaperOperation> wallpaper_op_; | 128 scoped_refptr<WallpaperOperation> wallpaper_op_; |
| 124 | 129 |
| 125 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; | 130 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; |
| 126 | 131 |
| 127 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); | 132 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
| 128 }; | 133 }; |
| 129 | 134 |
| 130 } // namespace ash | 135 } // namespace ash |
| 131 | 136 |
| 132 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 137 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
| OLD | NEW |