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

Unified Diff: chrome/browser/views/location_bar_view.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
« no previous file with comments | « chrome/browser/views/location_bar_view.h ('k') | chrome/common/extensions/extension_action.h » ('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 e5e4ece39e0331fdd03e9ebaea5cb6866adc44ec..663c81b4f268bcf16a58aee601f97b0ddeef56f4 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -1172,6 +1172,18 @@ void LocationBarView::SecurityImageView::ShowInfoBubble() {
SECURITY_INFO_BUBBLE_TEXT));
}
+void LocationBarView::PageActionImageView::Paint(gfx::Canvas* canvas) {
+ LocationBarImageView::Paint(canvas);
+
+ TabContents* contents = owner_->delegate_->GetTabContents();
+ if (!contents)
+ return;
+
+ const ExtensionActionState* state =
+ contents->GetPageActionState(page_action_);
+ state->PaintBadge(canvas, gfx::Rect(width(), height()));
+}
+
// PageActionImageView----------------------------------------------------------
LocationBarView::PageActionImageView::PageActionImageView(
« no previous file with comments | « chrome/browser/views/location_bar_view.h ('k') | chrome/common/extensions/extension_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698