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

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

Issue 10854153: Fix memory leak on Chromium OS Heapcheck and Chromium OS (valgrind) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use scoped ptr to manage ownership Created 8 years, 4 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/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
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 = NULL; 42 internal::DesktopBackgroundWidgetController* background =
43 internal::ComponentWrapper* wrapper = 43 owner_->GetProperty(internal::kWindowDesktopComponent);
44 owner_->GetProperty(internal::kComponentWrapper); 44 if (!background && owner_->GetProperty(internal::kComponentWrapper)) {
45 if (wrapper) 45 background = owner_->GetProperty(internal::kComponentWrapper)->
46 background = wrapper->component(); 46 GetComponent(false);
47 }
47 if (background) 48 if (background)
48 background->SetBounds(fullscreen_bounds); 49 background->SetBounds(fullscreen_bounds);
49 } 50 }
50 51
51 void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) { 52 void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
52 } 53 }
53 54
54 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout( 55 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout(
55 aura::Window* child) { 56 aura::Window* child) {
56 } 57 }
57 58
58 void RootWindowLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) { 59 void RootWindowLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
59 } 60 }
60 61
61 void RootWindowLayoutManager::OnChildWindowVisibilityChanged( 62 void RootWindowLayoutManager::OnChildWindowVisibilityChanged(
62 aura::Window* child, 63 aura::Window* child,
63 bool visible) { 64 bool visible) {
64 } 65 }
65 66
66 void RootWindowLayoutManager::SetChildBounds( 67 void RootWindowLayoutManager::SetChildBounds(
67 aura::Window* child, 68 aura::Window* child,
68 const gfx::Rect& requested_bounds) { 69 const gfx::Rect& requested_bounds) {
69 SetChildBoundsDirect(child, requested_bounds); 70 SetChildBoundsDirect(child, requested_bounds);
70 } 71 }
71 72
72 } // namespace internal 73 } // namespace internal
73 } // namespace ash 74 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698