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

Unified Diff: ui/base/resource/resource_bundle.h

Issue 10820049: Load 2x resources on demand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 8 years, 4 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/app_list/app_list_item_view.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 5eb61043cb0f443436472caea812b426ec8c2dbc..4fe430c36a2789ccbd437a2b22f12ceaf898d2e7 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -243,6 +243,9 @@ class UI_EXPORT ResourceBundle {
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LoadDataResourceBytes);
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LocaleDataPakExists);
+ class ResourceBundleImageSource;
+ friend class ResourceBundleImageSource;
+
// Ctor/dtor are private, since we're a singleton.
explicit ResourceBundle(Delegate* delegate);
~ResourceBundle();
@@ -269,9 +272,13 @@ class UI_EXPORT ResourceBundle {
void LoadFontsIfNecessary();
// Creates and returns a new SkBitmap given the data file to look in and the
- // resource id. It's up to the caller to free the returned bitmap when
+ // |resource_id|. It's up to the caller to free the returned bitmap when
// done.
- SkBitmap* LoadBitmap(const ResourceHandle& dll_inst, int resource_id);
+ SkBitmap* LoadBitmap(const ResourceHandle& dll_inst, int resource_id) const;
+
+ // Creates and returns a new SkBitmap for |resource_id| and |scale_factor|.
+ // Returns NULL if the resource does not exist.
+ SkBitmap* LoadBitmap(int resource_id, ScaleFactor scale_factor) const;
// Returns an empty image for when a resource cannot be loaded. This is a
// bright red bitmap.
@@ -310,8 +317,6 @@ class UI_EXPORT ResourceBundle {
scoped_ptr<gfx::Font> large_bold_font_;
scoped_ptr<gfx::Font> web_font_;
- static ResourceBundle* g_shared_instance_;
-
FilePath overridden_pak_path_;
DISALLOW_COPY_AND_ASSIGN(ResourceBundle);
« no previous file with comments | « ui/app_list/app_list_item_view.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698