Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ash/wm/root_window_layout_manager.cc

Issue 9428056: ash: Create new containers for PowerButtonController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update PowerButtonController Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/shell.h" 7 #include "ash/shell.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/views/widget/widget.h" 9 #include "ui/views/widget/widget.h"
10 10
(...skipping 28 matching lines...) Expand all
39 // RootWindowLayoutManager, aura::LayoutManager implementation: 39 // RootWindowLayoutManager, aura::LayoutManager implementation:
40 40
41 void RootWindowLayoutManager::OnWindowResized() { 41 void RootWindowLayoutManager::OnWindowResized() {
42 gfx::Rect fullscreen_bounds = 42 gfx::Rect fullscreen_bounds =
43 gfx::Rect(owner_->bounds().width(), owner_->bounds().height()); 43 gfx::Rect(owner_->bounds().width(), owner_->bounds().height());
44 44
45 // Change window mode before setting bounds on children so the children will 45 // Change window mode before setting bounds on children so the children will
46 // resize to fit the new workspace area. 46 // resize to fit the new workspace area.
47 Shell::GetInstance()->SetWindowModeForMonitorSize(fullscreen_bounds.size()); 47 Shell::GetInstance()->SetWindowModeForMonitorSize(fullscreen_bounds.size());
48 48
49 // Resize both our immediate children (the containers-of-containers animated
50 // by PowerButtonController) and their children (the actual containers).
49 aura::Window::Windows::const_iterator i; 51 aura::Window::Windows::const_iterator i;
50 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) 52 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) {
51 (*i)->SetBounds(fullscreen_bounds); 53 (*i)->SetBounds(fullscreen_bounds);
54 aura::Window::Windows::const_iterator j;
55 for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j)
56 (*j)->SetBounds(fullscreen_bounds);
57 }
52 58
53 if (background_widget_) 59 if (background_widget_)
54 background_widget_->SetBounds(fullscreen_bounds); 60 background_widget_->SetBounds(fullscreen_bounds);
55 if (background_layer_.get()) 61 if (background_layer_.get())
56 background_layer_->SetBounds(fullscreen_bounds); 62 background_layer_->SetBounds(fullscreen_bounds);
57 } 63 }
58 64
59 void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) { 65 void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
60 } 66 }
61 67
62 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout( 68 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout(
63 aura::Window* child) { 69 aura::Window* child) {
64 } 70 }
65 71
66 void RootWindowLayoutManager::OnChildWindowVisibilityChanged( 72 void RootWindowLayoutManager::OnChildWindowVisibilityChanged(
67 aura::Window* child, 73 aura::Window* child,
68 bool visible) { 74 bool visible) {
69 } 75 }
70 76
71 void RootWindowLayoutManager::SetChildBounds( 77 void RootWindowLayoutManager::SetChildBounds(
72 aura::Window* child, 78 aura::Window* child,
73 const gfx::Rect& requested_bounds) { 79 const gfx::Rect& requested_bounds) {
74 SetChildBoundsDirect(child, requested_bounds); 80 SetChildBoundsDirect(child, requested_bounds);
75 } 81 }
76 82
77 } // namespace internal 83 } // namespace internal
78 } // namespace ash 84 } // namespace ash
OLDNEW
« ash/wm/power_button_controller.cc ('K') | « ash/wm/power_button_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698