Index: chrome/browser/ui/views/location_bar/page_action_image_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc |
index ed0f8f60e19a7747998ab787dcf11dfb774fcaae..f275df83474727799e8160ca6bd02859e60a4c61 100644 |
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc |
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc |
@@ -177,8 +177,9 @@ void PageActionImageView::ShowContextMenu(const gfx::Point& p, |
return; |
} |
-void PageActionImageView::OnImageLoaded( |
- SkBitmap* image, const ExtensionResource& resource, int index) { |
+void PageActionImageView::OnImageLoaded(const gfx::Image& image, |
+ const std::string& extension_id, |
+ int index) { |
// We loaded icons()->size() icons, plus one extra if the page action had |
// a default icon. |
int total_icons = static_cast<int>(page_action_->icon_paths()->size()); |
@@ -188,11 +189,12 @@ void PageActionImageView::OnImageLoaded( |
// Map the index of the loaded image back to its name. If we ever get an |
// index greater than the number of icons, it must be the default icon. |
- if (image) { |
+ if (!image.IsEmpty()) { |
+ const SkBitmap* bitmap = image.ToSkBitmap(); |
if (index < static_cast<int>(page_action_->icon_paths()->size())) |
- page_action_icons_[page_action_->icon_paths()->at(index)] = *image; |
+ page_action_icons_[page_action_->icon_paths()->at(index)] = *bitmap; |
else |
- page_action_icons_[page_action_->default_icon_path()] = *image; |
+ page_action_icons_[page_action_->default_icon_path()] = *bitmap; |
} |
// During object construction (before the parent has been set) we are already |