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

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: . 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 | « no previous file | ui/base/resource/resource_bundle.cc » ('j') | ui/base/resource/resource_bundle.cc » ('J')
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..78b80f5ed31ea1a158ad75ab7a040d56065849bf 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,10 +272,14 @@ 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);
+ // 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);
+
// Returns an empty image for when a resource cannot be loaded. This is a
// bright red bitmap.
gfx::Image& GetEmptyImage();
@@ -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 | « no previous file | ui/base/resource/resource_bundle.cc » ('j') | ui/base/resource/resource_bundle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698