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 10 matching lines...) Expand all Loading... |
21 // (kComponentWrapper). When the animation completes the old | 21 // (kComponentWrapper). When the animation completes the old |
22 // DesktopBackgroundWidgetController is destroyed. | 22 // DesktopBackgroundWidgetController is destroyed. |
23 class DesktopBackgroundWidgetController { | 23 class DesktopBackgroundWidgetController { |
24 public: | 24 public: |
25 // Create | 25 // Create |
26 explicit DesktopBackgroundWidgetController(views::Widget* widget); | 26 explicit DesktopBackgroundWidgetController(views::Widget* widget); |
27 explicit DesktopBackgroundWidgetController(ui::Layer* layer); | 27 explicit DesktopBackgroundWidgetController(ui::Layer* layer); |
28 | 28 |
29 ~DesktopBackgroundWidgetController(); | 29 ~DesktopBackgroundWidgetController(); |
30 | 30 |
| 31 // Drop widget reference. widget is not owned. |
| 32 void CleanupWidget(); |
| 33 |
31 // Set bounds of component that draws background. | 34 // Set bounds of component that draws background. |
32 void SetBounds(gfx::Rect bounds); | 35 void SetBounds(gfx::Rect bounds); |
33 | 36 |
34 // Move component from |src_container| in |root_window| to |dest_container|. | 37 // Move component from |src_container| in |root_window| to |dest_container|. |
35 // It is required for lock screen, when we need to move background so that | 38 // It is required for lock screen, when we need to move background so that |
36 // it hides user's windows. | 39 // it hides user's windows. |
37 void Reparent(aura::RootWindow* root_window, | 40 void Reparent(aura::RootWindow* root_window, |
38 int src_container, | 41 int src_container, |
39 int dest_container); | 42 int dest_container); |
40 | 43 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // to root windows. | 76 // to root windows. |
74 extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const | 77 extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const |
75 kWindowDesktopComponent; | 78 kWindowDesktopComponent; |
76 | 79 |
77 extern const aura::WindowProperty<ComponentWrapper*>* const kComponentWrapper; | 80 extern const aura::WindowProperty<ComponentWrapper*>* const kComponentWrapper; |
78 | 81 |
79 } // namespace internal | 82 } // namespace internal |
80 } // namespace ash | 83 } // namespace ash |
81 | 84 |
82 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ | 85 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
OLD | NEW |