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

Unified Diff: chrome/browser/extensions/context_menu_matcher.cc

Issue 2576833002: Make some updates to extension iconography. (Closed)
Patch Set: add test Created 4 years 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/context_menu_matcher.cc
diff --git a/chrome/browser/extensions/context_menu_matcher.cc b/chrome/browser/extensions/context_menu_matcher.cc
index 533cf56e23bb7358b1925d64b18b12895365c309..fdda6a909bf94b1d5c7664b516a30326f2ef9491 100644
--- a/chrome/browser/extensions/context_menu_matcher.cc
+++ b/chrome/browser/extensions/context_menu_matcher.cc
@@ -308,11 +308,10 @@ void ContextMenuMatcher::SetExtensionIcon(const std::string& extension_id) {
int index = menu_model_->GetItemCount() - 1;
DCHECK_GE(index, 0);
- const SkBitmap& icon = menu_manager->GetIconForExtension(extension_id);
- DCHECK(icon.width() == gfx::kFaviconSize);
- DCHECK(icon.height() == gfx::kFaviconSize);
-
- menu_model_->SetIcon(index, gfx::Image::CreateFrom1xBitmap(icon));
+ gfx::Image icon = menu_manager->GetIconForExtension(extension_id);
+ DCHECK_EQ(gfx::kFaviconSize, icon.Width());
+ DCHECK_EQ(gfx::kFaviconSize, icon.Height());
+ menu_model_->SetIcon(index, icon);
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698