Chromium Code Reviews| 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); |