| Index: chrome/browser/dom_ui/dom_ui_theme_source.cc
|
| ===================================================================
|
| --- chrome/browser/dom_ui/dom_ui_theme_source.cc (revision 22426)
|
| +++ chrome/browser/dom_ui/dom_ui_theme_source.cc (working copy)
|
| @@ -155,18 +155,14 @@
|
| ThemeProvider* tp = profile_->GetThemeProvider();
|
| DCHECK(tp);
|
|
|
| - SkBitmap* image = tp->GetBitmapNamed(resource_id);
|
| - if (!image || image->empty()) {
|
| + std::vector<unsigned char> png_bytes;
|
| + if (tp->GetRawData(resource_id, &png_bytes)) {
|
| + scoped_refptr<RefCountedBytes> image_data =
|
| + new RefCountedBytes(png_bytes);
|
| + SendResponse(request_id, image_data);
|
| + } else {
|
| SendResponse(request_id, NULL);
|
| - return;
|
| }
|
| -
|
| - std::vector<unsigned char> png_bytes;
|
| - PNGEncoder::EncodeBGRASkBitmap(*image, false, &png_bytes);
|
| -
|
| - scoped_refptr<RefCountedBytes> image_data =
|
| - new RefCountedBytes(png_bytes);
|
| - SendResponse(request_id, image_data);
|
| }
|
|
|
| std::string DOMUIThemeSource::GetNewTabBackgroundCSS(bool bar_attached) {
|
|
|