| 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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/desktop_background/desktop_background_controller_observer.h" | 8 #include "ash/desktop_background/desktop_background_controller_observer.h" |
| 9 #include "ash/desktop_background/desktop_background_view.h" | 9 #include "ash/desktop_background/desktop_background_view.h" |
| 10 #include "ash/desktop_background/desktop_background_widget_controller.h" | 10 #include "ash/desktop_background/desktop_background_widget_controller.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 using ash::internal::DesktopBackgroundWidgetController; | 36 using ash::internal::DesktopBackgroundWidgetController; |
| 37 using content::BrowserThread; | 37 using content::BrowserThread; |
| 38 | 38 |
| 39 namespace ash { | 39 namespace ash { |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 // How long to wait reloading the wallpaper after the max display has | 42 // How long to wait reloading the wallpaper after the max display has |
| 43 // changed? | 43 // changed? |
| 44 const int kWallpaperReloadDelayMs = 2000; | 44 const int kWallpaperReloadDelayMs = 2000; |
| 45 | 45 |
| 46 const SkColor kTransparentColor = SkColorSetARGB(0x00, 0x00, 0x00, 0x00); | |
| 47 | |
| 48 internal::RootWindowLayoutManager* GetRootWindowLayoutManager( | 46 internal::RootWindowLayoutManager* GetRootWindowLayoutManager( |
| 49 aura::RootWindow* root_window) { | 47 aura::RootWindow* root_window) { |
| 50 return static_cast<internal::RootWindowLayoutManager*>( | 48 return static_cast<internal::RootWindowLayoutManager*>( |
| 51 root_window->layout_manager()); | 49 root_window->layout_manager()); |
| 52 } | 50 } |
| 53 | 51 |
| 54 } // namespace | 52 } // namespace |
| 55 | 53 |
| 56 const int kSmallWallpaperMaxWidth = 1366; | 54 const int kSmallWallpaperMaxWidth = 1366; |
| 57 const int kSmallWallpaperMaxHeight = 800; | 55 const int kSmallWallpaperMaxHeight = 800; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 iter->rotation() == gfx::Display::ROTATE_270) { | 461 iter->rotation() == gfx::Display::ROTATE_270) { |
| 464 size_in_pixel = gfx::Size(size_in_pixel.height(), size_in_pixel.width()); | 462 size_in_pixel = gfx::Size(size_in_pixel.height(), size_in_pixel.width()); |
| 465 } | 463 } |
| 466 width = std::max(size_in_pixel.width(), width); | 464 width = std::max(size_in_pixel.width(), width); |
| 467 height = std::max(size_in_pixel.height(), height); | 465 height = std::max(size_in_pixel.height(), height); |
| 468 } | 466 } |
| 469 return gfx::Size(width, height); | 467 return gfx::Size(width, height); |
| 470 } | 468 } |
| 471 | 469 |
| 472 } // namespace ash | 470 } // namespace ash |
| OLD | NEW |