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

Side by Side Diff: views/controls/native/native_view_host_gtk.cc

Issue 8353034: Fix for a memory leak in views/controls/native/native_view_host_gtk.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « tools/valgrind/memcheck/suppressions.txt ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/controls/native/native_view_host_gtk.h" 5 #include "views/controls/native/native_view_host_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 installed_clip_(false), 105 installed_clip_(false),
106 destroy_signal_id_(0), 106 destroy_signal_id_(0),
107 focus_signal_id_(0), 107 focus_signal_id_(0),
108 fixed_(NULL) { 108 fixed_(NULL) {
109 CreateFixed(false); 109 CreateFixed(false);
110 } 110 }
111 111
112 NativeViewHostGtk::~NativeViewHostGtk() { 112 NativeViewHostGtk::~NativeViewHostGtk() {
113 if (fixed_) { 113 if (fixed_) {
114 gtk_container_foreach(GTK_CONTAINER(fixed_), RemoveFromParent, fixed_); 114 gtk_container_foreach(GTK_CONTAINER(fixed_), RemoveFromParent, fixed_);
115 gtk_widget_destroy(fixed_); 115 DestroyFixed();
116 } 116 }
117 } 117 }
118 118
119 //////////////////////////////////////////////////////////////////////////////// 119 ////////////////////////////////////////////////////////////////////////////////
120 // NativeViewHostGtk, NativeViewHostWrapper implementation: 120 // NativeViewHostGtk, NativeViewHostWrapper implementation:
121 121
122 void NativeViewHostGtk::NativeViewAttached() { 122 void NativeViewHostGtk::NativeViewAttached() {
123 AttachHostWidget(); 123 AttachHostWidget();
124 124
125 GtkWidget* host_widget = host_->native_view(); 125 GtkWidget* host_widget = host_->native_view();
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // static 404 // static
405 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( 405 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper(
406 NativeViewHost* host) { 406 NativeViewHost* host) {
407 if (Widget::IsPureViews() && 407 if (Widget::IsPureViews() &&
408 views::ViewsDelegate::views_delegate->GetDefaultParentView()) 408 views::ViewsDelegate::views_delegate->GetDefaultParentView())
409 return new NativeViewHostViews(host); 409 return new NativeViewHostViews(host);
410 return new NativeViewHostGtk(host); 410 return new NativeViewHostGtk(host);
411 } 411 }
412 412
413 } // namespace views 413 } // namespace views
OLDNEW
« no previous file with comments | « tools/valgrind/memcheck/suppressions.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698