| 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/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
| 10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Moves all desktop components from one container to other across all root | 126 // Moves all desktop components from one container to other across all root |
| 127 // windows. Returns true if a desktop moved. | 127 // windows. Returns true if a desktop moved. |
| 128 bool ReparentBackgroundWidgets(int src_container, int dst_container); | 128 bool ReparentBackgroundWidgets(int src_container, int dst_container); |
| 129 | 129 |
| 130 // Returns id for background container for unlocked and locked states. | 130 // Returns id for background container for unlocked and locked states. |
| 131 int GetBackgroundContainerId(bool locked); | 131 int GetBackgroundContainerId(bool locked); |
| 132 | 132 |
| 133 // Send notification that background animation finished. | 133 // Send notification that background animation finished. |
| 134 void NotifyAnimationFinished(); | 134 void NotifyAnimationFinished(); |
| 135 | 135 |
| 136 // Reload the wallpaper. | 136 // Reload the wallpaper. |clear_cache| specifies whether to clear the |
| 137 void UpdateWallpaper(); | 137 // wallpaper cahce or not. |
| 138 void UpdateWallpaper(bool clear_cache); |
| 138 | 139 |
| 139 void set_wallpaper_reload_delay_for_test(bool value) { | 140 void set_wallpaper_reload_delay_for_test(bool value) { |
| 140 wallpaper_reload_delay_ = value; | 141 wallpaper_reload_delay_ = value; |
| 141 } | 142 } |
| 142 | 143 |
| 143 // Can change at runtime. | 144 // Can change at runtime. |
| 144 bool locked_; | 145 bool locked_; |
| 145 | 146 |
| 146 BackgroundMode desktop_background_mode_; | 147 BackgroundMode desktop_background_mode_; |
| 147 | 148 |
| 148 SkColor background_color_; | 149 SkColor background_color_; |
| 149 | 150 |
| 150 ObserverList<DesktopBackgroundControllerObserver> observers_; | 151 ObserverList<DesktopBackgroundControllerObserver> observers_; |
| 151 | 152 |
| 152 // The current wallpaper. | 153 // The current wallpaper. |
| 153 scoped_ptr<wallpaper::WallpaperResizer> current_wallpaper_; | 154 scoped_ptr<wallpaper::WallpaperResizer> current_wallpaper_; |
| 154 | 155 |
| 155 gfx::Size current_max_display_size_; | 156 gfx::Size current_max_display_size_; |
| 156 | 157 |
| 157 base::OneShotTimer<DesktopBackgroundController> timer_; | 158 base::OneShotTimer<DesktopBackgroundController> timer_; |
| 158 | 159 |
| 159 int wallpaper_reload_delay_; | 160 int wallpaper_reload_delay_; |
| 160 | 161 |
| 161 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); | 162 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
| 162 }; | 163 }; |
| 163 | 164 |
| 164 } // namespace ash | 165 } // namespace ash |
| 165 | 166 |
| 166 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 167 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
| OLD | NEW |