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

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

Issue 291003: Implement badges for page actions. Also add badge text color API. (Closed)
Patch Set: argb Created 11 years, 2 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/common/extensions/extension_action.cc
diff --git a/chrome/common/extensions/extension_action.cc b/chrome/common/extensions/extension_action.cc
index 13ee202b64614b7f39b1279aaaf626702403f363..de15f178cd2f4b8a0049b83987c6619151c997de 100644
--- a/chrome/common/extensions/extension_action.cc
+++ b/chrome/common/extensions/extension_action.cc
@@ -20,7 +20,7 @@ ExtensionAction::~ExtensionAction() {
}
void ExtensionActionState::PaintBadge(gfx::Canvas* canvas,
- const gfx::Rect& bounds) {
+ const gfx::Rect& bounds) const {
const std::string& text = badge_text();
if (text.empty())
return;
@@ -49,7 +49,7 @@ void ExtensionActionState::PaintBadge(gfx::Canvas* canvas,
SkTypeface* typeface = SkTypeface::CreateFromName("Arial", SkTypeface::kBold);
SkPaint text_paint;
text_paint.setAntiAlias(true);
- text_paint.setColor(SK_ColorWHITE);
+ text_paint.setColor(badge_text_color());
text_paint.setFakeBoldText(true);
text_paint.setTextAlign(SkPaint::kLeft_Align);
text_paint.setTextSize(SkIntToScalar(kTextSize));
« no previous file with comments | « chrome/common/extensions/extension_action.h ('k') | chrome/test/data/extensions/samples/test_browser_action/background.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698