| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "ash/desktop_background/desktop_background_resources.h" | 10 #include "ash/desktop_background/desktop_background_resources.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // Get the desktop background mode. | 45 // Get the desktop background mode. |
| 46 BackgroundMode desktop_background_mode() const { | 46 BackgroundMode desktop_background_mode() const { |
| 47 return desktop_background_mode_; | 47 return desktop_background_mode_; |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Load default wallpaper at |index| asynchronously and set to current | 50 // Load default wallpaper at |index| asynchronously and set to current |
| 51 // wallpaper after loaded. | 51 // wallpaper after loaded. |
| 52 void SetDefaultWallpaper(int index); | 52 void SetDefaultWallpaper(int index); |
| 53 | 53 |
| 54 // Called when user selects a file from file system or changes the layout. |
| 55 void SetCustomWallpaper(const SkBitmap& wallpaper, WallpaperLayout layout); |
| 56 |
| 54 // Cancel the current wallpaper loading operation. | 57 // Cancel the current wallpaper loading operation. |
| 55 void CancelPendingWallpaperOperation(); | 58 void CancelPendingWallpaperOperation(); |
| 56 | 59 |
| 57 // Load logged in user wallpaper asynchronously and set to current wallpaper | 60 // Load logged in user wallpaper asynchronously and set to current wallpaper |
| 58 // after loaded. | 61 // after loaded. |
| 59 void SetLoggedInUserWallpaper(); | 62 void SetLoggedInUserWallpaper(); |
| 60 | 63 |
| 61 // Sets the desktop background to solid color mode and create a solid color | 64 // Sets the desktop background to solid color mode and create a solid color |
| 62 // layout. | 65 // layout. |
| 63 void SetDesktopBackgroundSolidColorMode(); | 66 void SetDesktopBackgroundSolidColorMode(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 91 scoped_refptr<WallpaperOperation> wallpaper_op_; | 94 scoped_refptr<WallpaperOperation> wallpaper_op_; |
| 92 | 95 |
| 93 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; | 96 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; |
| 94 | 97 |
| 95 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); | 98 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 } // namespace ash | 101 } // namespace ash |
| 99 | 102 |
| 100 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 103 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
| OLD | NEW |