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

Side by Side Diff: chrome/browser/ui/gtk/theme_service_gtk.cc

Issue 9855028: gtk: Fix memory leak in ThemeServiceGtk::LoadGtkValues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | 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 "chrome/browser/ui/gtk/theme_service_gtk.h" 5 #include "chrome/browser/ui/gtk/theme_service_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 SetThemeColorFromGtk(ThemeService::COLOR_NTP_LINK, 772 SetThemeColorFromGtk(ThemeService::COLOR_NTP_LINK,
773 link_color); 773 link_color);
774 SetThemeColorFromGtk(ThemeService::COLOR_NTP_LINK_UNDERLINE, 774 SetThemeColorFromGtk(ThemeService::COLOR_NTP_LINK_UNDERLINE,
775 link_color); 775 link_color);
776 SetThemeColorFromGtk(ThemeService::COLOR_NTP_SECTION_LINK, 776 SetThemeColorFromGtk(ThemeService::COLOR_NTP_SECTION_LINK,
777 link_color); 777 link_color);
778 SetThemeColorFromGtk(ThemeService::COLOR_NTP_SECTION_LINK_UNDERLINE, 778 SetThemeColorFromGtk(ThemeService::COLOR_NTP_SECTION_LINK_UNDERLINE,
779 link_color); 779 link_color);
780 780
781 gdk_color_free(const_cast<GdkColor*>(link_color));
John Knottenbelt 2012/03/27 09:30:42 We shouldn't free link_color if it is &kDefaultLin
782
781 // Generate the colors that we pass to WebKit. 783 // Generate the colors that we pass to WebKit.
782 focus_ring_color_ = gfx::GdkColorToSkColor(frame_color); 784 focus_ring_color_ = gfx::GdkColorToSkColor(frame_color);
783 GdkColor thumb_active_color, thumb_inactive_color, track_color; 785 GdkColor thumb_active_color, thumb_inactive_color, track_color;
784 ThemeServiceGtk::GetScrollbarColors(&thumb_active_color, 786 ThemeServiceGtk::GetScrollbarColors(&thumb_active_color,
785 &thumb_inactive_color, 787 &thumb_inactive_color,
786 &track_color); 788 &track_color);
787 thumb_active_color_ = gfx::GdkColorToSkColor(thumb_active_color); 789 thumb_active_color_ = gfx::GdkColorToSkColor(thumb_active_color);
788 thumb_inactive_color_ = gfx::GdkColorToSkColor(thumb_inactive_color); 790 thumb_inactive_color_ = gfx::GdkColorToSkColor(thumb_inactive_color);
789 track_color_ = gfx::GdkColorToSkColor(track_color); 791 track_color_ = gfx::GdkColorToSkColor(track_color);
790 792
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 cairo_new_path(cr); 1128 cairo_new_path(cr);
1127 cairo_set_line_width(cr, 1.0); 1129 cairo_set_line_width(cr, 1.0);
1128 cairo_move_to(cr, start_x, allocation.y); 1130 cairo_move_to(cr, start_x, allocation.y);
1129 cairo_line_to(cr, start_x, allocation.y + allocation.height); 1131 cairo_line_to(cr, start_x, allocation.y + allocation.height);
1130 cairo_stroke(cr); 1132 cairo_stroke(cr);
1131 cairo_destroy(cr); 1133 cairo_destroy(cr);
1132 cairo_pattern_destroy(pattern); 1134 cairo_pattern_destroy(pattern);
1133 1135
1134 return TRUE; 1136 return TRUE;
1135 } 1137 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698