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

Unified Diff: chrome/browser/themes/browser_theme_pack.h

Issue 6849030: Add support for multi resolution icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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
Index: chrome/browser/themes/browser_theme_pack.h
diff --git a/chrome/browser/themes/browser_theme_pack.h b/chrome/browser/themes/browser_theme_pack.h
index ed3d26ddaa6fdce7f6a1920cb8ba5c7bca753cbe..bb60f8a8835044f43b42fcd825c77f535709dec7 100644
--- a/chrome/browser/themes/browser_theme_pack.h
+++ b/chrome/browser/themes/browser_theme_pack.h
@@ -75,6 +75,10 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
// for making layout decisions in the interface.
SkBitmap* GetBitmapNamed(int id) const;
+ // Get bitmaps for the given |id|. This can be used for icons rendered at
+ // multiple resolutions.
+ bool GetBitmapsNamed(int id, std::vector<SkBitmap*>& bitmaps) const;
Nico 2011/04/14 18:28:54 Introduce a new class and have this return that. e
Robert Sesek 2011/04/14 18:42:44 If I'm understanding correctly, this is exactly wh
+
// Returns the raw PNG encoded data for IDR_THEME_NTP_*. This method is only
// supposed to work for the NTP attribution and background resources.
RefCountedMemory* GetRawData(int id) const;
@@ -91,6 +95,7 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
// track of the pointers. We own these and will delete them when we're done
// using them.
typedef std::map<int, SkBitmap*> ImageCache;
+ typedef std::map<int, std::vector<SkBitmap*>* > MultiResImageCache;
// The raw PNG memory associated with a certain id.
typedef std::map<int, scoped_refptr<RefCountedMemory> > RawImages;
@@ -226,7 +231,7 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
ImageCache prepared_images_;
// Loaded images. These are loaded from |image_memory_| or the |data_pack_|.
- mutable ImageCache loaded_images_;
+ mutable MultiResImageCache loaded_images_;
DISALLOW_COPY_AND_ASSIGN(BrowserThemePack);
};
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack.cc » ('j') | chrome/browser/themes/browser_theme_pack.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698