OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura_shell/desktop_layout_manager.h" | 5 #include "ui/aura_shell/root_window_layout_manager.h" |
6 | 6 |
7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
8 #include "ui/views/widget/widget.h" | 8 #include "ui/views/widget/widget.h" |
9 | 9 |
10 namespace aura_shell { | 10 namespace aura_shell { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 //////////////////////////////////////////////////////////////////////////////// | 13 //////////////////////////////////////////////////////////////////////////////// |
14 // DesktopLayoutManager, public: | 14 // RootWindowLayoutManager, public: |
15 | 15 |
16 DesktopLayoutManager::DesktopLayoutManager(aura::Window* owner) | 16 RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner) |
17 : owner_(owner), | 17 : owner_(owner), |
18 background_widget_(NULL) { | 18 background_widget_(NULL) { |
19 } | 19 } |
20 | 20 |
21 DesktopLayoutManager::~DesktopLayoutManager() { | 21 RootWindowLayoutManager::~RootWindowLayoutManager() { |
22 } | 22 } |
23 | 23 |
24 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
25 // DesktopLayoutManager, aura::LayoutManager implementation: | 25 // RootWindowLayoutManager, aura::LayoutManager implementation: |
26 | 26 |
27 void DesktopLayoutManager::OnWindowResized() { | 27 void RootWindowLayoutManager::OnWindowResized() { |
28 gfx::Rect fullscreen_bounds = | 28 gfx::Rect fullscreen_bounds = |
29 gfx::Rect(owner_->bounds().width(), owner_->bounds().height()); | 29 gfx::Rect(owner_->bounds().width(), owner_->bounds().height()); |
30 | 30 |
31 aura::Window::Windows::const_iterator i; | 31 aura::Window::Windows::const_iterator i; |
32 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) | 32 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) |
33 (*i)->SetBounds(fullscreen_bounds); | 33 (*i)->SetBounds(fullscreen_bounds); |
34 | 34 |
35 background_widget_->SetBounds(fullscreen_bounds); | 35 background_widget_->SetBounds(fullscreen_bounds); |
36 } | 36 } |
37 | 37 |
38 void DesktopLayoutManager::OnWindowAddedToLayout(aura::Window* child) { | 38 void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) { |
39 } | 39 } |
40 | 40 |
41 void DesktopLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) { | 41 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout( |
| 42 aura::Window* child) { |
42 } | 43 } |
43 | 44 |
44 void DesktopLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child, | 45 void RootWindowLayoutManager::OnChildWindowVisibilityChanged( |
45 bool visible) { | 46 aura::Window* child, |
| 47 bool visible) { |
46 } | 48 } |
47 | 49 |
48 void DesktopLayoutManager::SetChildBounds(aura::Window* child, | 50 void RootWindowLayoutManager::SetChildBounds( |
49 const gfx::Rect& requested_bounds) { | 51 aura::Window* child, |
| 52 const gfx::Rect& requested_bounds) { |
50 SetChildBoundsDirect(child, requested_bounds); | 53 SetChildBoundsDirect(child, requested_bounds); |
51 } | 54 } |
52 | 55 |
53 } // namespace internal | 56 } // namespace internal |
54 } // namespace aura_shell | 57 } // namespace aura_shell |
OLD | NEW |