| 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" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
| 15 #include "ui/aura/window_observer.h" | 15 #include "ui/aura/window_observer.h" |
| 16 #include "ui/compositor/layer.h" | 16 #include "ui/compositor/layer.h" |
| 17 #include "ui/gfx/image/image_skia.h" | 17 #include "ui/gfx/image/image_skia.h" |
| 18 | 18 |
| 19 typedef unsigned int SkColor; | 19 typedef unsigned int SkColor; |
| 20 | 20 |
| 21 namespace aura { | 21 namespace aura { |
| 22 class RootWindow; | 22 class RootWindow; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace ash { | 25 namespace ash { |
| 26 | 26 |
| 27 // The width and height of small/large resolution wallpaper. When screen size is |
| 28 // smaller than |kSmallWallpaperMaxWidth| and |kSmallWallpaperMaxHeight|, the |
| 29 // small resolution wallpaper should be used. Otherwise, uses the large |
| 30 // resolution wallpaper. |
| 31 ASH_EXPORT extern const int kSmallWallpaperMaxWidth; |
| 32 ASH_EXPORT extern const int kSmallWallpaperMaxHeight; |
| 33 ASH_EXPORT extern const int kLargeWallpaperMaxWidth; |
| 34 ASH_EXPORT extern const int kLargeWallpaperMaxHeight; |
| 35 |
| 27 class UserWallpaperDelegate { | 36 class UserWallpaperDelegate { |
| 28 public: | 37 public: |
| 29 virtual ~UserWallpaperDelegate() {} | 38 virtual ~UserWallpaperDelegate() {} |
| 30 | 39 |
| 31 // Returns type of window animation that should be used when showin wallpaper. | 40 // Returns type of window animation that should be used when showin wallpaper. |
| 32 virtual ash::WindowVisibilityAnimationType GetAnimationType() = 0; | 41 virtual ash::WindowVisibilityAnimationType GetAnimationType() = 0; |
| 33 | 42 |
| 34 // Initialize wallpaper. | 43 // Initialize wallpaper. |
| 35 virtual void InitializeWallpaper() = 0; | 44 virtual void InitializeWallpaper() = 0; |
| 36 | 45 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 scoped_refptr<WallpaperOperation> wallpaper_op_; | 178 scoped_refptr<WallpaperOperation> wallpaper_op_; |
| 170 | 179 |
| 171 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; | 180 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; |
| 172 | 181 |
| 173 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); | 182 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
| 174 }; | 183 }; |
| 175 | 184 |
| 176 } // namespace ash | 185 } // namespace ash |
| 177 | 186 |
| 178 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 187 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
| OLD | NEW |