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

Unified Diff: chrome/browser/views/location_bar_view.cc

Issue 306044: Refactor implementation of BrowserActions, and add support for (Closed)
Patch Set: Make it work on linux too 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
« no previous file with comments | « chrome/browser/views/browser_actions_container.cc ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/location_bar_view.cc
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index 9ca58e8b8a2a048ac6bcc8a18bfc03607b3a3f98..d43fc6e7633c2a1c8d4e632fe5f2cca68899f0f3 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -126,8 +126,12 @@ void LocationBarView::PageActionWithBadgeView::PaintChildren(
gfx::Canvas* canvas) {
View::PaintChildren(canvas);
const ExtensionActionState* state = image_view_->GetPageActionState();
- if (state)
- state->PaintBadge(canvas, gfx::Rect(width(), height()));
+ if (state) {
+ ExtensionActionState::PaintBadge(canvas, gfx::Rect(width(), height()),
+ state->badge_text(),
+ state->badge_text_color(),
+ state->badge_background_color());
+ }
}
void LocationBarView::PageActionWithBadgeView::UpdateVisibility(
@@ -1238,8 +1242,12 @@ void LocationBarView::PageActionImageView::Paint(gfx::Canvas* canvas) {
const ExtensionActionState* state =
contents->GetPageActionState(page_action_);
- if (state)
- state->PaintBadge(canvas, gfx::Rect(width(), height()));
+ if (state) {
+ ExtensionActionState::PaintBadge(canvas, gfx::Rect(width(), height()),
+ state->badge_text(),
+ state->badge_text_color(),
+ state->badge_background_color());
+ }
}
// PageActionImageView----------------------------------------------------------
« no previous file with comments | « chrome/browser/views/browser_actions_container.cc ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698