| Index: chrome/common/extensions/extension_action.h
|
| diff --git a/chrome/common/extensions/extension_action.h b/chrome/common/extensions/extension_action.h
|
| index f09148760a58afe5fac2573b84f136155e9b56b6..8b49d28c8bb369e5e74779ea053fdd10d135f29b 100644
|
| --- a/chrome/common/extensions/extension_action.h
|
| +++ b/chrome/common/extensions/extension_action.h
|
| @@ -10,6 +10,8 @@
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/scoped_ptr.h"
|
| +#include "third_party/skia/include/core/SkColor.h"
|
|
|
| class ExtensionAction {
|
| public:
|
| @@ -74,12 +76,25 @@ typedef std::map<std::string, ExtensionAction*> ExtensionActionMap;
|
| class ExtensionActionState {
|
| public:
|
| ExtensionActionState(std::string title, int icon_index)
|
| - : title_(title), icon_index_(icon_index) {
|
| + : title_(title), icon_index_(icon_index),
|
| + badge_background_color_(new SkColor(SkColorSetARGB(255, 218, 0, 24))) {
|
| }
|
|
|
| - std::string title() const { return title_; }
|
| + const std::string& title() const { return title_; }
|
| void set_title(const std::string& title) { title_ = title; }
|
|
|
| + const std::string& badge_text() const { return badge_text_; }
|
| + void set_badge_text(const std::string& badge_text) {
|
| + badge_text_ = badge_text;
|
| + }
|
| +
|
| + SkColor* badge_background_color() const {
|
| + return badge_background_color_.get();
|
| + }
|
| + void set_badge_background_color(const SkColor& badge_background_color) {
|
| + badge_background_color_.reset(new SkColor(badge_background_color));
|
| + }
|
| +
|
| int icon_index() const { return icon_index_; }
|
| void set_icon_index(int icon_index) { icon_index_ = icon_index; }
|
|
|
| @@ -90,6 +105,12 @@ class ExtensionActionState {
|
| // The icon to use.
|
| int icon_index_;
|
|
|
| + // The badge text.
|
| + std::string badge_text_;
|
| +
|
| + // The background color for the badge.
|
| + scoped_ptr<SkColor> badge_background_color_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ExtensionActionState);
|
| };
|
|
|
|
|