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

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

Issue 1669163002: [Extensions] Allow extensions to set a rectangular icon for the extension action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/extension_action.cc
diff --git a/chrome/browser/extensions/extension_action.cc b/chrome/browser/extensions/extension_action.cc
index 05b7d86857f5a9d6821800280505677c66bf798a..64a794959fdbe1cfb9379446d082f0786b768627 100644
--- a/chrome/browser/extensions/extension_action.cc
+++ b/chrome/browser/extensions/extension_action.cc
@@ -150,10 +150,8 @@ bool ExtensionAction::ParseIconFromCanvasDictionary(
// Chrome helpfully scales the provided icon(s), but let's not go overboard.
const int kActionIconMaxSize = 10 * extension_misc::EXTENSION_ICON_ACTION;
- if (bitmap.drawsNothing() || bitmap.width() != bitmap.height() ||
- bitmap.width() > kActionIconMaxSize) {
+ if (bitmap.drawsNothing() || bitmap.width() > kActionIconMaxSize)
continue;
- }
float scale =
static_cast<float>(bitmap.width()) / ExtensionAction::ActionIconSize();

Powered by Google App Engine
This is Rietveld 408576698