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_WIDGET_CONTROLLER_H_ | 5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ | 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
12 #include "ui/compositor/layer.h" | 13 #include "ui/compositor/layer.h" |
13 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
14 #include "ui/views/widget/widget_observer.h" | 15 #include "ui/views/widget/widget_observer.h" |
15 | 16 |
16 namespace ash { | 17 namespace ash { |
17 class RootWindowController; | 18 class RootWindowController; |
18 | 19 |
19 // This class implements a widget-based wallpaper. | 20 // This class implements a widget-based wallpaper. |
20 // DesktopBackgroundWidgetController is owned by RootWindowController. | 21 // DesktopBackgroundWidgetController is owned by RootWindowController. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // widget will show again. As a result, the blue wallpaper fades in from red | 78 // widget will show again. As a result, the blue wallpaper fades in from red |
78 // wallpaper. This is a bad user experience. See bug http://crbug.com/156542 | 79 // wallpaper. This is a bad user experience. See bug http://crbug.com/156542 |
79 // for more details. | 80 // for more details. |
80 void StopAnimating(); | 81 void StopAnimating(); |
81 | 82 |
82 // Gets the wrapped DesktopBackgroundWidgetController pointer. Caller should | 83 // Gets the wrapped DesktopBackgroundWidgetController pointer. Caller should |
83 // take ownership of the pointer if |pass_ownership| is true. | 84 // take ownership of the pointer if |pass_ownership| is true. |
84 DesktopBackgroundWidgetController* GetController(bool pass_ownership); | 85 DesktopBackgroundWidgetController* GetController(bool pass_ownership); |
85 | 86 |
86 private: | 87 private: |
87 scoped_ptr<DesktopBackgroundWidgetController> controller_; | 88 std::unique_ptr<DesktopBackgroundWidgetController> controller_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(AnimatingDesktopController); | 90 DISALLOW_COPY_AND_ASSIGN(AnimatingDesktopController); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace ash | 93 } // namespace ash |
93 | 94 |
94 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ | 95 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
OLD | NEW |