| 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 19 matching lines...) Expand all Loading... |
| 30 virtual ~DesktopBackgroundWidgetController(); | 30 virtual ~DesktopBackgroundWidgetController(); |
| 31 | 31 |
| 32 // Overridden from views::WidgetObserver. | 32 // Overridden from views::WidgetObserver. |
| 33 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 33 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
| 34 | 34 |
| 35 // Set bounds of component that draws background. | 35 // Set bounds of component that draws background. |
| 36 void SetBounds(gfx::Rect bounds); | 36 void SetBounds(gfx::Rect bounds); |
| 37 | 37 |
| 38 // Move component from |src_container| in |root_window| to |dest_container|. | 38 // Move component from |src_container| in |root_window| to |dest_container|. |
| 39 // It is required for lock screen, when we need to move background so that | 39 // It is required for lock screen, when we need to move background so that |
| 40 // it hides user's windows. | 40 // it hides user's windows. Returns true if there was something to reparent. |
| 41 void Reparent(aura::RootWindow* root_window, | 41 bool Reparent(aura::RootWindow* root_window, |
| 42 int src_container, | 42 int src_container, |
| 43 int dest_container); | 43 int dest_container); |
| 44 | 44 |
| 45 views::Widget* widget() { return widget_; } | 45 views::Widget* widget() { return widget_; } |
| 46 ui::Layer* layer() { return layer_.get(); } | 46 ui::Layer* layer() { return layer_.get(); } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 views::Widget* widget_; | 49 views::Widget* widget_; |
| 50 scoped_ptr<ui::Layer> layer_; | 50 scoped_ptr<ui::Layer> layer_; |
| 51 | 51 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 77 // to root windows. | 77 // to root windows. |
| 78 extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const | 78 extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const |
| 79 kWindowDesktopComponent; | 79 kWindowDesktopComponent; |
| 80 | 80 |
| 81 extern const aura::WindowProperty<ComponentWrapper*>* const kComponentWrapper; | 81 extern const aura::WindowProperty<ComponentWrapper*>* const kComponentWrapper; |
| 82 | 82 |
| 83 } // namespace internal | 83 } // namespace internal |
| 84 } // namespace ash | 84 } // namespace ash |
| 85 | 85 |
| 86 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ | 86 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
| OLD | NEW |