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

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

Issue 196573023: Remove PrepareForShutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « ash/root_window_settings.cc ('k') | mojo/examples/aura_demo/window_tree_host_mojo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/desktop_background/desktop_background_widget_controller.h" 7 #include "ash/desktop_background/desktop_background_widget_controller.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/root_window_settings.h"
9 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
10 #include "ui/compositor/layer.h" 11 #include "ui/compositor/layer.h"
11 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
12 13
13 namespace ash { 14 namespace ash {
14 namespace internal { 15 namespace internal {
15 16
16 //////////////////////////////////////////////////////////////////////////////// 17 ////////////////////////////////////////////////////////////////////////////////
17 // RootWindowLayoutManager, public: 18 // RootWindowLayoutManager, public:
18 19
19 RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner) 20 RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner)
20 : owner_(owner) { 21 : owner_(owner) {
21 } 22 }
22 23
23 RootWindowLayoutManager::~RootWindowLayoutManager() { 24 RootWindowLayoutManager::~RootWindowLayoutManager() {
24 } 25 }
25 26
26 27
27 //////////////////////////////////////////////////////////////////////////////// 28 ////////////////////////////////////////////////////////////////////////////////
28 // RootWindowLayoutManager, aura::LayoutManager implementation: 29 // RootWindowLayoutManager, aura::LayoutManager implementation:
29 30
30 void RootWindowLayoutManager::OnWindowResized() { 31 void RootWindowLayoutManager::OnWindowResized() {
32 // X event may arrive during shutdown.
33 if (GetRootWindowSettings(owner_->GetRootWindow())->shutdown)
34 return;
35
31 gfx::Rect fullscreen_bounds = 36 gfx::Rect fullscreen_bounds =
32 gfx::Rect(owner_->bounds().width(), owner_->bounds().height()); 37 gfx::Rect(owner_->bounds().width(), owner_->bounds().height());
33 38
34 // Resize both our immediate children (the containers-of-containers animated 39 // Resize both our immediate children (the containers-of-containers animated
35 // by PowerButtonController) and their children (the actual containers). 40 // by PowerButtonController) and their children (the actual containers).
36 aura::Window::Windows::const_iterator i; 41 aura::Window::Windows::const_iterator i;
37 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) { 42 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) {
38 (*i)->SetBounds(fullscreen_bounds); 43 (*i)->SetBounds(fullscreen_bounds);
39 aura::Window::Windows::const_iterator j; 44 aura::Window::Windows::const_iterator j;
40 for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j) 45 for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j)
(...skipping 28 matching lines...) Expand all
69 } 74 }
70 75
71 void RootWindowLayoutManager::SetChildBounds( 76 void RootWindowLayoutManager::SetChildBounds(
72 aura::Window* child, 77 aura::Window* child,
73 const gfx::Rect& requested_bounds) { 78 const gfx::Rect& requested_bounds) {
74 SetChildBoundsDirect(child, requested_bounds); 79 SetChildBoundsDirect(child, requested_bounds);
75 } 80 }
76 81
77 } // namespace internal 82 } // namespace internal
78 } // namespace ash 83 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_settings.cc ('k') | mojo/examples/aura_demo/window_tree_host_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698