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

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

Issue 2447553003: More pre-MD odds and ends. (Closed)
Patch Set: fix typo Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_action.cc
diff --git a/chrome/browser/extensions/extension_action.cc b/chrome/browser/extensions/extension_action.cc
index 4eeab31b8d24956295364a277fffd8c1c5b3ab1b..12d2789838d6a3b4da05b1b3f0cf5e33bf1f1eee 100644
--- a/chrome/browser/extensions/extension_action.cc
+++ b/chrome/browser/extensions/extension_action.cc
@@ -23,7 +23,6 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
-#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/gfx/canvas.h"
@@ -79,9 +78,7 @@ bool HasValue(const std::map<int, T>& map, int tab_id) {
} // namespace
extension_misc::ExtensionIcons ExtensionAction::ActionIconSize() {
- return ui::MaterialDesignController::IsModeMaterial()
- ? extension_misc::EXTENSION_ICON_BITTY
- : extension_misc::EXTENSION_ICON_ACTION;
+ return extension_misc::EXTENSION_ICON_BITTY;
}
const int ExtensionAction::kDefaultTabId = -1;
@@ -148,12 +145,11 @@ bool ExtensionAction::ParseIconFromCanvasDictionary(
CHECK(!bitmap.isNull());
// Chrome helpfully scales the provided icon(s), but let's not go overboard.
- const int kActionIconMaxSize = 10 * extension_misc::EXTENSION_ICON_ACTION;
+ const int kActionIconMaxSize = 10 * ActionIconSize();
if (bitmap.drawsNothing() || bitmap.width() > kActionIconMaxSize)
continue;
- float scale =
- static_cast<float>(bitmap.width()) / ExtensionAction::ActionIconSize();
+ float scale = static_cast<float>(bitmap.width()) / ActionIconSize();
icon->AddRepresentation(gfx::ImageSkiaRep(bitmap, scale));
}
return true;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698