| Index: chrome/browser/browser_theme_provider.cc
|
| ===================================================================
|
| --- chrome/browser/browser_theme_provider.cc (revision 24969)
|
| +++ chrome/browser/browser_theme_provider.cc (working copy)
|
| @@ -496,9 +496,11 @@
|
| process_images_ = true;
|
|
|
| GenerateFrameColors();
|
| - GenerateFrameImages();
|
| - GenerateTabImages();
|
| - WriteImagesToDisk();
|
| + if (ShouldTintFrames()) {
|
| + GenerateFrameImages();
|
| + GenerateTabImages();
|
| + WriteImagesToDisk();
|
| + }
|
|
|
| NotifyThemeChanged();
|
| UserMetrics::RecordAction(L"Themes_Installed", profile_);
|
| @@ -924,9 +926,7 @@
|
| frame.reset(NULL);
|
| } else {
|
| // If the theme doesn't specify an image, then apply the tint to
|
| - // the default frame. Note that the default theme provides default
|
| - // bitmaps for all frame types, so this isn't strictly necessary
|
| - // in the case where no tint is provided either.
|
| + // the default frame.
|
| frame.reset(new SkBitmap(*rb_.GetBitmapNamed(IDR_THEME_FRAME)));
|
| }
|
|
|
| @@ -940,6 +940,15 @@
|
| }
|
| }
|
|
|
| +bool BrowserThemeProvider::ShouldTintFrames() {
|
| + return (HasCustomImage(IDR_THEME_FRAME) ||
|
| + tints_.find(GetTintKey(TINT_BACKGROUND_TAB)) != tints_.end() ||
|
| + tints_.find(GetTintKey(TINT_FRAME)) != tints_.end() ||
|
| + tints_.find(GetTintKey(TINT_FRAME_INACTIVE)) != tints_.end() ||
|
| + tints_.find(GetTintKey(TINT_FRAME_INCOGNITO)) != tints_.end() ||
|
| + tints_.find(GetTintKey(TINT_FRAME_INCOGNITO_INACTIVE)) != tints_.end());
|
| +}
|
| +
|
| void BrowserThemeProvider::GenerateTabImages() {
|
| GenerateBitmap(IDR_THEME_TAB_BACKGROUND);
|
| GenerateBitmap(IDR_THEME_TAB_BACKGROUND_INCOGNITO);
|
|
|
| Property changes on: chrome\browser\browser_theme_provider.cc
|
| ___________________________________________________________________
|
| Modified: svn:mergeinfo
|
| Merged /trunk/src/chrome/browser/browser_theme_provider.cc:r24709
|
|
|
|
|