summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.h
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 01:33:36 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 01:33:36 +0000
commit04a1f975f55a6bd2d73a45f0cec8bb2b8a5a67dd (patch)
tree6da04673ee580778b5ae4f1d42bae5d83df2ae93 /chrome/browser/browser_theme_provider.h
parentbec7e3c3e479216d419281af4bf52151101fb6a9 (diff)
downloadchromium_src-04a1f975f55a6bd2d73a45f0cec8bb2b8a5a67dd.zip
chromium_src-04a1f975f55a6bd2d73a45f0cec8bb2b8a5a67dd.tar.gz
chromium_src-04a1f975f55a6bd2d73a45f0cec8bb2b8a5a67dd.tar.bz2
Make the DOMUIThemeSource load and pass through a PNG, rather than relying on decode/encode.
BUG=18427 TEST=Install a giant theme, load the NNTP, verify that you can type in the omnibox without delay while the page is loading. Review URL: http://codereview.chromium.org/159891 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.h')
-rw-r--r--chrome/browser/browser_theme_provider.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/browser_theme_provider.h b/chrome/browser/browser_theme_provider.h
index d1cd510..525d396 100644
--- a/chrome/browser/browser_theme_provider.h
+++ b/chrome/browser/browser_theme_provider.h
@@ -154,6 +154,7 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
virtual bool GetDisplayProperty(int id, int* result);
virtual bool ShouldUseNativeFrame();
virtual bool HasCustomImage(int id);
+ virtual bool GetRawData(int id, std::vector<unsigned char>* raw_data);
#if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)
virtual GdkPixbuf* GetPixbufNamed(int id);
virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id);
@@ -176,6 +177,10 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
// locally customized.)
std::string GetThemeID();
+ // Reads the image data from the theme file into the specified vector. Returns
+ // true on success.
+ bool ReadThemeFileData(int id, std::vector<unsigned char>* raw_data);
+
// Convert a bitfield alignment into a string like "top left". Public so that
// it can be used to generate CSS values. Takes a bitfield of AlignmentMasks.
static std::string AlignmentToString(int alignment);
@@ -229,10 +234,7 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
typedef std::map<const std::string, SkColor> ColorMap;
typedef std::map<const std::string, skia::HSL> TintMap;
typedef std::map<const std::string, int> DisplayPropertyMap;
-
- // Reads the image data from the theme file into the specified vector. Returns
- // true on success.
- bool ReadThemeFileData(int id, std::vector<unsigned char>* raw_data);
+ typedef std::map<const int, std::vector<unsigned char> > RawDataMap;
// Returns the string key for the given tint |id| TINT_* enum value.
const std::string GetTintKey(int id);
@@ -316,6 +318,7 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
ImageMap images_;
ColorMap colors_;
TintMap tints_;
+ RawDataMap raw_data_;
DisplayPropertyMap display_properties_;
DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider);