| Index: chrome/browser/themes/theme_service_mac.mm
|
| diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm
|
| index 30d359ee203040d8f36aca70ad7887d964e97253..c355e0d4155ac572b6c5a4a3c9d84d03234d010d 100644
|
| --- a/chrome/browser/themes/theme_service_mac.mm
|
| +++ b/chrome/browser/themes/theme_service_mac.mm
|
| @@ -10,7 +10,9 @@
|
| #include "chrome/browser/themes/browser_theme_pack.h"
|
| #include "skia/ext/skia_utils_mac.h"
|
| #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
|
| +#include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/color_utils.h"
|
| +#include "ui/gfx/image.h"
|
|
|
| NSString* const kBrowserThemeDidChangeNotification =
|
| @"BrowserThemeDidChangeNotification";
|
| @@ -44,8 +46,16 @@ NSImage* ThemeService::GetNSImageNamed(int id, bool allow_default) const {
|
| // SkBitmap > native conversion?
|
| // - For consistency with other platforms.
|
| // - To get the generated tinted images.
|
| - SkBitmap* bitmap = GetBitmapNamed(id);
|
| - NSImage* nsimage = gfx::SkBitmapToNSImage(*bitmap);
|
| + NSImage* nsimage = nil;
|
| + if (theme_pack_.get()) {
|
| + SkBitmap* bitmap = theme_pack_->GetBitmapNamed(id);
|
| + if (bitmap)
|
| + nsimage = gfx::SkBitmapToNSImage(*bitmap);
|
| + }
|
| +
|
| + if (!nsimage) {
|
| + nsimage = rb_.GetNativeImageNamed(id);
|
| + }
|
|
|
| // We loaded successfully. Cache the image.
|
| if (nsimage) {
|
|
|