diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/location_bar/page_action_decoration.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/cocoa/location_bar/page_action_decoration.mm index 1813bb8..31e1c23 100644 --- a/chrome/browser/cocoa/location_bar/page_action_decoration.mm +++ b/chrome/browser/cocoa/location_bar/page_action_decoration.mm @@ -141,8 +141,17 @@ void PageActionDecoration::UpdateVisibility( } } - if (!skia_icon.isNull()) + if (!skia_icon.isNull()) { SetImage(gfx::SkBitmapToNSImage(skia_icon)); + } else if (!GetImage()) { + // During install the action can be displayed before the icons + // have come in. Rather than deal with this in multiple places, + // provide a placeholder image. This will be replaced when an + // icon comes in. + const NSSize default_size = NSMakeSize(Extension::kPageActionIconMaxSize, + Extension::kPageActionIconMaxSize); + SetImage([[NSImage alloc] initWithSize:default_size]); + } } if (IsVisible() != visible) { SetVisible(visible); |