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 #include "ash/wm/root_window_layout_manager.h" | 5 #include "ash/wm/root_window_layout_manager.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_widget_controller.h" | 7 #include "ash/desktop_background/desktop_background_widget_controller.h" |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 #include "ui/compositor/layer.h" | 9 #include "ui/compositor/layer.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Resize both our immediate children (the containers-of-containers animated | 33 // Resize both our immediate children (the containers-of-containers animated |
34 // by PowerButtonController) and their children (the actual containers). | 34 // by PowerButtonController) and their children (the actual containers). |
35 aura::Window::Windows::const_iterator i; | 35 aura::Window::Windows::const_iterator i; |
36 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) { | 36 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) { |
37 (*i)->SetBounds(fullscreen_bounds); | 37 (*i)->SetBounds(fullscreen_bounds); |
38 aura::Window::Windows::const_iterator j; | 38 aura::Window::Windows::const_iterator j; |
39 for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j) | 39 for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j) |
40 (*j)->SetBounds(fullscreen_bounds); | 40 (*j)->SetBounds(fullscreen_bounds); |
41 } | 41 } |
42 internal::DesktopBackgroundWidgetController* background = | 42 internal::DesktopBackgroundWidgetController* background = NULL; |
43 owner_->GetProperty(internal::kWindowDesktopComponent); | 43 internal::ComponentWrapper* wrapper = |
| 44 owner_->GetProperty(internal::kComponentWrapper); |
| 45 if (wrapper) |
| 46 background = wrapper->component(); |
44 if (background) | 47 if (background) |
45 background->SetBounds(fullscreen_bounds); | 48 background->SetBounds(fullscreen_bounds); |
46 } | 49 } |
47 | 50 |
48 void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) { | 51 void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) { |
49 } | 52 } |
50 | 53 |
51 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout( | 54 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout( |
52 aura::Window* child) { | 55 aura::Window* child) { |
53 } | 56 } |
54 | 57 |
55 void RootWindowLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) { | 58 void RootWindowLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) { |
56 } | 59 } |
57 | 60 |
58 void RootWindowLayoutManager::OnChildWindowVisibilityChanged( | 61 void RootWindowLayoutManager::OnChildWindowVisibilityChanged( |
59 aura::Window* child, | 62 aura::Window* child, |
60 bool visible) { | 63 bool visible) { |
61 } | 64 } |
62 | 65 |
63 void RootWindowLayoutManager::SetChildBounds( | 66 void RootWindowLayoutManager::SetChildBounds( |
64 aura::Window* child, | 67 aura::Window* child, |
65 const gfx::Rect& requested_bounds) { | 68 const gfx::Rect& requested_bounds) { |
66 SetChildBoundsDirect(child, requested_bounds); | 69 SetChildBoundsDirect(child, requested_bounds); |
67 } | 70 } |
68 | 71 |
69 } // namespace internal | 72 } // namespace internal |
70 } // namespace ash | 73 } // namespace ash |
OLD | NEW |