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

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

Issue 10834279: Give request-to-act badges a grey background, and increase spacing to make it fit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Views UI; clean up GTK Created 8 years, 4 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.h
diff --git a/chrome/common/extensions/extension_action.h b/chrome/common/extensions/extension_action.h
index d111678b525a41e04d0c2eed4cd7a02cae1a11fa..de095b2f622a432b13c341d6d145cbab0652d63f 100644
--- a/chrome/common/extensions/extension_action.h
+++ b/chrome/common/extensions/extension_action.h
@@ -39,6 +39,10 @@ class ExtensionAction {
// parameter.
static const int kDefaultTabId;
+ static const SkColor kGetAttentionBorderColor;
Peter Kasting 2012/08/24 23:08:28 Nit: Why are these public class members instead of
Jeffrey Yasskin 2012/08/29 00:37:50 At one point I was using them from the platform-sp
+ static const SkColor kGetAttentionBackgroundTopColor;
+ static const SkColor kGetAttentionBackgroundBottomColor;
+
// The types of extension actions.
enum Type {
TYPE_BROWSER,
@@ -236,9 +240,20 @@ class ExtensionAction {
return GetValue(&appearance_, tab_id) != INVISIBLE;
}
+ // True if the tab's action wants the user's attention.
+ bool WantsAttention(int tab_id) const {
+ return GetValue(&appearance_, tab_id) == WANTS_ATTENTION;
+ }
+
// Remove all tab-specific state.
void ClearAllValuesForTab(int tab_id);
+ // Paint the background and border for |tab_id|. |bounds| should include the
+ // top and bottom of the location bar, and the middle column exactly between
+ // two ExtensionActions, so both ExtensionActions can draw on it.
Peter Kasting 2012/08/24 23:08:28 Nit: You might want to note in this comment what s
Jeffrey Yasskin 2012/08/29 00:37:50 Done.
+ void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds,
Peter Kasting 2012/08/24 23:08:28 Nit: One line per arg
Jeffrey Yasskin 2012/08/29 00:37:50 Oops, done.
+ int tab_id);
+
// If the specified tab has a badge, paint it into the provided bounds.
void PaintBadge(gfx::Canvas* canvas, const gfx::Rect& bounds, int tab_id);

Powered by Google App Engine
This is Rietveld 408576698