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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/aura/window_property.h" | 9 #include "ui/aura/window_property.h" |
10 #include "ui/compositor/layer.h" | 10 #include "ui/compositor/layer.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // This class wraps a DesktopBackgroundWidgetController pointer. It is installed | 51 // This class wraps a DesktopBackgroundWidgetController pointer. It is installed |
52 // as an owned property on the RootWindow. DesktopBackgroundWidgetController is | 52 // as an owned property on the RootWindow. DesktopBackgroundWidgetController is |
53 // moved to this property before animation completes. After animation completes, | 53 // moved to this property before animation completes. After animation completes, |
54 // the kWindowDesktopComponent property on RootWindow is set to the | 54 // the kWindowDesktopComponent property on RootWindow is set to the |
55 // DesktopBackgroundWidgetController in this class. | 55 // DesktopBackgroundWidgetController in this class. |
56 class ComponentWrapper { | 56 class ComponentWrapper { |
57 public: | 57 public: |
58 explicit ComponentWrapper( | 58 explicit ComponentWrapper( |
59 DesktopBackgroundWidgetController* component); | 59 DesktopBackgroundWidgetController* component); |
60 ~ComponentWrapper() {} | 60 ~ComponentWrapper(); |
61 | 61 |
62 // Gets the wrapped DesktopBackgroundWidgetController pointer. Caller should | 62 // Gets the wrapped DesktopBackgroundWidgetController pointer. Caller should |
63 // take ownership of the pointer if |pass_ownership| is true. | 63 // take ownership of the pointer if |pass_ownership| is true. |
64 DesktopBackgroundWidgetController* GetComponent(bool pass_ownership); | 64 DesktopBackgroundWidgetController* GetComponent(bool pass_ownership); |
65 | 65 |
66 private: | 66 private: |
67 scoped_ptr<DesktopBackgroundWidgetController> component_; | 67 scoped_ptr<DesktopBackgroundWidgetController> component_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(ComponentWrapper); | 69 DISALLOW_COPY_AND_ASSIGN(ComponentWrapper); |
70 }; | 70 }; |
71 | 71 |
72 // Window property key, that binds instance of DesktopBackgroundWidgetController | 72 // Window property key, that binds instance of DesktopBackgroundWidgetController |
73 // to root windows. | 73 // to root windows. |
74 extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const | 74 extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const |
75 kWindowDesktopComponent; | 75 kWindowDesktopComponent; |
76 | 76 |
77 extern const aura::WindowProperty<ComponentWrapper*>* const kComponentWrapper; | 77 extern const aura::WindowProperty<ComponentWrapper*>* const kComponentWrapper; |
78 | 78 |
79 } // namespace internal | 79 } // namespace internal |
80 } // namespace ash | 80 } // namespace ash |
81 | 81 |
82 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ | 82 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
OLD | NEW |