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

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

Issue 8917026: GTK: Remove the one user of GetRTLEnabledSurfaceNamed() and move it over to ResourceBundle(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 6 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (theme_thumb_active) 563 if (theme_thumb_active)
564 *thumb_active_color = *theme_thumb_active; 564 *thumb_active_color = *theme_thumb_active;
565 565
566 if (theme_thumb_inactive) 566 if (theme_thumb_inactive)
567 *thumb_inactive_color = *theme_thumb_inactive; 567 *thumb_inactive_color = *theme_thumb_inactive;
568 568
569 if (theme_trough_color) 569 if (theme_trough_color)
570 *track_color = *theme_trough_color; 570 *track_color = *theme_trough_color;
571 } 571 }
572 572
573 gfx::CairoCachedSurface* GtkThemeService::GetRTLEnabledSurfaceNamed(
574 int id,
575 GtkWidget* widget_on_display) {
576 // We flip the sign of |id| when passing it to GetSurfaceNamedImpl() for the
577 // same reason that ThemeService::GetPixbufImpl() does: so that if one
578 // location calls this function with a resource ID, and another place calls
579 // GetSurfaceNamed() with the same ID, they'll correctly get different
580 // surfaces in RTL mode.
581 return GetSurfaceNamedImpl(
582 -id,
583 &per_display_surfaces_,
584 &GtkThemeService::GetRTLEnabledPixbufNamedWrapper,
585 widget_on_display);
586 }
587
588 gfx::CairoCachedSurface* GtkThemeService::GetCairoIcon( 573 gfx::CairoCachedSurface* GtkThemeService::GetCairoIcon(
589 int id, 574 int id,
590 GtkWidget* widget_on_display) { 575 GtkWidget* widget_on_display) {
591 return GetSurfaceNamedImpl(id, 576 return GetSurfaceNamedImpl(id,
592 &per_display_icon_surfaces_, 577 &per_display_icon_surfaces_,
593 &GtkThemeService::GetPixbufForIconId, 578 &GtkThemeService::GetPixbufForIconId,
594 widget_on_display); 579 widget_on_display);
595 } 580 }
596 581
597 // static 582 // static
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 cairo_new_path(cr); 1213 cairo_new_path(cr);
1229 cairo_set_line_width(cr, 1.0); 1214 cairo_set_line_width(cr, 1.0);
1230 cairo_move_to(cr, start_x, allocation.y); 1215 cairo_move_to(cr, start_x, allocation.y);
1231 cairo_line_to(cr, start_x, allocation.y + allocation.height); 1216 cairo_line_to(cr, start_x, allocation.y + allocation.height);
1232 cairo_stroke(cr); 1217 cairo_stroke(cr);
1233 cairo_destroy(cr); 1218 cairo_destroy(cr);
1234 cairo_pattern_destroy(pattern); 1219 cairo_pattern_destroy(pattern);
1235 1220
1236 return TRUE; 1221 return TRUE;
1237 } 1222 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698