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

Unified Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 10388064: Add GetImageSkiaNamed to resource_bundle and theme_provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 7 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_theme_service.cc
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index 84975ba7bbce25a7f41e857869c772946632d91b..cd6b0ab4a3058aaef2cf370d7c4a72e4465d4daf 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -301,6 +301,12 @@ SkBitmap* GtkThemeService::GetBitmapNamed(int id) const {
return const_cast<SkBitmap*>(GetImageNamed(id)->ToSkBitmap());
}
+gfx::ImageSkia* GtkThemeService::GetImageSkiaNamed(int id) const {
+ // TODO(pkotwicz): Remove this const cast. The gfx::Image interface returns
+ // its images const. GetImageSkiaNamed() also should but has many callsites.
+ return const_cast<gfx::ImageSkia*>(GetImageNamed(id)->ToImageSkia());
+}
+
const gfx::Image* GtkThemeService::GetImageNamed(int id) const {
// Try to get our cached version:
ImageCache::const_iterator it = gtk_images_.find(id);
« 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