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

Side by Side Diff: ash/desktop_background/desktop_background_view.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: Nit 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/desktop_background/desktop_background_view.h" 5 #include "ash/desktop_background/desktop_background_view.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 private: 44 private:
45 // Overridden from ui::ImplicitAnimationObserver: 45 // Overridden from ui::ImplicitAnimationObserver:
46 virtual void OnImplicitAnimationsCompleted() OVERRIDE { 46 virtual void OnImplicitAnimationsCompleted() OVERRIDE {
47 ash::Shell* shell = ash::Shell::GetInstance(); 47 ash::Shell* shell = ash::Shell::GetInstance();
48 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished(); 48 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished();
49 // Only removes old component when wallpaper animation finished. If we 49 // Only removes old component when wallpaper animation finished. If we
50 // remove the old one too early, there will be a white flash during 50 // remove the old one too early, there will be a white flash during
51 // animation. 51 // animation.
52 if (root_window_->GetProperty(kComponentWrapper)) { 52 if (root_window_->GetProperty(kComponentWrapper)) {
53 internal::DesktopBackgroundWidgetController* component = 53 internal::DesktopBackgroundWidgetController* component =
54 root_window_->GetProperty(kComponentWrapper)->component(); 54 root_window_->GetProperty(kComponentWrapper)->GetComponent(true);
55 root_window_->SetProperty(kWindowDesktopComponent, component); 55 root_window_->SetProperty(kWindowDesktopComponent, component);
56 } 56 }
57 57
58 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 58 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
59 } 59 }
60 60
61 aura::RootWindow* root_window_; 61 aura::RootWindow* root_window_;
62 int container_id_; 62 int container_id_;
63 views::Widget* desktop_widget_; 63 views::Widget* desktop_widget_;
64 64
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, 180 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window,
181 container_id, 181 container_id,
182 desktop_widget)); 182 desktop_widget));
183 desktop_widget->Show(); 183 desktop_widget->Show();
184 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); 184 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView");
185 return desktop_widget; 185 return desktop_widget;
186 } 186 }
187 187
188 } // namespace internal 188 } // namespace internal
189 } // namespace ash 189 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_controller.cc ('k') | ash/desktop_background/desktop_background_widget_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698