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

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

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

Powered by Google App Engine
This is Rietveld 408576698