Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2160)

Unified Diff: chrome/browser/extensions/api/extension_action/extension_actions_api.cc

Issue 10827191: Convert extension action icons code to use ImageSkia instead of SkBitmap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove includes we don't need anymore Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/extension_action/extension_actions_api.cc
diff --git a/chrome/browser/extensions/api/extension_action/extension_actions_api.cc b/chrome/browser/extensions/api/extension_action/extension_actions_api.cc
index 975fc6f72d8163ba9f0be37807f90050705dd97b..a08fa370ad8e6d502f8a2f1764c54cf25765d2d0 100644
--- a/chrome/browser/extensions/api/extension_action/extension_actions_api.cc
+++ b/chrome/browser/extensions/api/extension_action/extension_actions_api.cc
@@ -212,7 +212,7 @@ bool ExtensionActionSetIconFunction::RunExtensionAction() {
SkBitmap bitmap;
EXTENSION_FUNCTION_VALIDATE(
IPC::ReadParam(&bitmap_pickle, &iter, &bitmap));
- extension_action_->SetIcon(tab_id_, bitmap);
+ extension_action_->SetIcon(tab_id_, gfx::Image(bitmap));
Jeffrey Yasskin 2012/08/09 21:39:04 Do you want to use the ImageSkiaRep(bitmap, SCALE_
tbarzic 2012/08/10 06:24:08 I don't think it's necessary.. I will probably jus
} else if (details_->GetInteger("iconIndex", &icon_index)) {
// If --enable-script-badges is on there might legitimately be an iconIndex
// set. Until we decide what to do with that, ignore.
@@ -224,7 +224,7 @@ bool ExtensionActionSetIconFunction::RunExtensionAction() {
error_ = kIconIndexOutOfBounds;
return false;
}
- extension_action_->SetIcon(tab_id_, SkBitmap());
+ extension_action_->SetIcon(tab_id_, gfx::Image());
extension_action_->SetIconIndex(tab_id_, icon_index);
} else {
EXTENSION_FUNCTION_VALIDATE(false);

Powered by Google App Engine
This is Rietveld 408576698