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

Unified Diff: ui/base/resource/resource_bundle.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 | « ui/base/resource/resource_bundle.h ('k') | ui/base/theme_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index d6a69bd31ac84c65650c8eb9ee18696c72b7c831..f84e8dbb8d432f03040d2a7ef4e472c06ce51c10 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -212,6 +212,11 @@ SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) {
return const_cast<SkBitmap*>(bitmap);
}
+gfx::ImageSkia* ResourceBundle::GetImageSkiaNamed(int resource_id) {
+ const gfx::ImageSkia* image = GetImageNamed(resource_id).ToImageSkia();
+ return const_cast<gfx::ImageSkia*>(image);
+}
+
gfx::Image& ResourceBundle::GetImageNamed(int resource_id) {
// Check to see if the image is already in the cache.
{
« no previous file with comments | « ui/base/resource/resource_bundle.h ('k') | ui/base/theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698