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 #include "ash/desktop_background/desktop_background_controller.h" | 5 #include "ash/desktop_background/desktop_background_controller.h" |
6 | 6 |
7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
8 #include "ash/common/display/display_info.h" | |
9 #include "ash/common/shell_window_ids.h" | 8 #include "ash/common/shell_window_ids.h" |
10 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
11 #include "ash/desktop_background/desktop_background_controller_observer.h" | 10 #include "ash/desktop_background/desktop_background_controller_observer.h" |
12 #include "ash/desktop_background/desktop_background_view.h" | 11 #include "ash/desktop_background/desktop_background_view.h" |
13 #include "ash/desktop_background/desktop_background_widget_controller.h" | 12 #include "ash/desktop_background/desktop_background_widget_controller.h" |
14 #include "ash/desktop_background/user_wallpaper_delegate.h" | 13 #include "ash/desktop_background/user_wallpaper_delegate.h" |
15 #include "ash/root_window_controller.h" | 14 #include "ash/root_window_controller.h" |
16 #include "ash/shell.h" | 15 #include "ash/shell.h" |
17 #include "base/bind.h" | 16 #include "base/bind.h" |
18 #include "base/logging.h" | 17 #include "base/logging.h" |
19 #include "base/threading/sequenced_worker_pool.h" | 18 #include "base/threading/sequenced_worker_pool.h" |
20 #include "components/wallpaper/wallpaper_resizer.h" | 19 #include "components/wallpaper/wallpaper_resizer.h" |
21 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
| 21 #include "ui/display/manager/display_info.h" |
22 #include "ui/display/screen.h" | 22 #include "ui/display/screen.h" |
23 #include "ui/views/widget/widget.h" | 23 #include "ui/views/widget/widget.h" |
24 | 24 |
25 namespace ash { | 25 namespace ash { |
26 namespace { | 26 namespace { |
27 | 27 |
28 // How long to wait reloading the wallpaper after the display size has changed. | 28 // How long to wait reloading the wallpaper after the display size has changed. |
29 const int kWallpaperReloadDelayMs = 100; | 29 const int kWallpaperReloadDelayMs = 100; |
30 | 30 |
31 } // namespace | 31 } // namespace |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 return locked ? kShellWindowId_LockScreenBackgroundContainer | 249 return locked ? kShellWindowId_LockScreenBackgroundContainer |
250 : kShellWindowId_DesktopBackgroundContainer; | 250 : kShellWindowId_DesktopBackgroundContainer; |
251 } | 251 } |
252 | 252 |
253 void DesktopBackgroundController::UpdateWallpaper(bool clear_cache) { | 253 void DesktopBackgroundController::UpdateWallpaper(bool clear_cache) { |
254 current_wallpaper_.reset(); | 254 current_wallpaper_.reset(); |
255 Shell::GetInstance()->user_wallpaper_delegate()->UpdateWallpaper(clear_cache); | 255 Shell::GetInstance()->user_wallpaper_delegate()->UpdateWallpaper(clear_cache); |
256 } | 256 } |
257 | 257 |
258 } // namespace ash | 258 } // namespace ash |
OLD | NEW |