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

Side by Side Diff: ash/root_window_controller.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: 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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_widget_controller.h" 9 #include "ash/desktop_background/desktop_background_widget_controller.h"
10 #include "ash/display/display_controller.h" 10 #include "ash/display/display_controller.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 new internal::BaseLayoutManager( 278 new internal::BaseLayoutManager(
279 always_on_top_container->GetRootWindow())); 279 always_on_top_container->GetRootWindow()));
280 } 280 }
281 281
282 void RootWindowController::CreateContainers() { 282 void RootWindowController::CreateContainers() {
283 CreateContainersInRootWindow(root_window_.get()); 283 CreateContainersInRootWindow(root_window_.get());
284 } 284 }
285 285
286 void RootWindowController::CloseChildWindows() { 286 void RootWindowController::CloseChildWindows() {
287 // Close background widget first as it depends on tooltip. 287 // Close background widget first as it depends on tooltip.
288 if (root_window_->GetProperty(internal::kComponentWrapper) &&
289 (root_window_->GetProperty(internal::kWindowDesktopComponent) !=
290 root_window_->GetProperty(internal::kComponentWrapper)->component()))
291 delete root_window_->GetProperty(internal::kComponentWrapper)->component();
288 root_window_->SetProperty(kWindowDesktopComponent, 292 root_window_->SetProperty(kWindowDesktopComponent,
289 static_cast<DesktopBackgroundWidgetController*>(NULL)); 293 static_cast<DesktopBackgroundWidgetController*>(NULL));
290 root_window_->SetProperty(kComponentWrapper, 294 root_window_->SetProperty(kComponentWrapper,
291 static_cast<ComponentWrapper*>(NULL)); 295 static_cast<ComponentWrapper*>(NULL));
292 296
293 workspace_controller_.reset(); 297 workspace_controller_.reset();
294 aura::client::SetTooltipClient(root_window_.get(), NULL); 298 aura::client::SetTooltipClient(root_window_.get(), NULL);
295 299
296 while (!root_window_->children().empty()) { 300 while (!root_window_->children().empty()) {
297 aura::Window* child = root_window_->children()[0]; 301 aura::Window* child = root_window_->children()[0];
(...skipping 26 matching lines...) Expand all
324 // Restore focused or active window if it's still alive. 328 // Restore focused or active window if it's still alive.
325 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { 329 if (focused && tracker.Contains(focused) && dst->Contains(focused)) {
326 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); 330 dst->GetFocusManager()->SetFocusedWindow(focused, NULL);
327 } else if (active && tracker.Contains(active) && dst->Contains(active)) { 331 } else if (active && tracker.Contains(active) && dst->Contains(active)) {
328 activation_client->ActivateWindow(active); 332 activation_client->ActivateWindow(active);
329 } 333 }
330 } 334 }
331 335
332 } // namespace internal 336 } // namespace internal
333 } // namespace ash 337 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698