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

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

Issue 269079: Implement new page action API. (Closed)
Patch Set: compile fixes 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
Index: chrome/common/extensions/extension_action.h
diff --git a/chrome/common/extensions/extension_action.h b/chrome/common/extensions/extension_action.h
index 2e34bbbb8976ccb803223ba07ee13b86c25eabbf..7e66937718ea781bf8c59b58f58d057f784afd33 100644
--- a/chrome/common/extensions/extension_action.h
+++ b/chrome/common/extensions/extension_action.h
@@ -87,7 +87,7 @@ typedef std::map<std::string, ExtensionAction*> ExtensionActionMap;
class ExtensionActionState {
public:
ExtensionActionState(std::string title, int icon_index)
- : title_(title), icon_index_(icon_index),
+ : hidden_(false), title_(title), icon_index_(icon_index),
badge_background_color_(SkColorSetARGB(255, 218, 0, 24)) {
}
@@ -112,9 +112,15 @@ class ExtensionActionState {
SkBitmap* icon() const { return icon_.get(); }
void set_icon(SkBitmap* icon) { icon_.reset(icon); }
+ bool hidden() const { return hidden_; }
+ void set_hidden(bool hidden) { hidden_ = hidden; }
+
void PaintBadge(gfx::Canvas* canvas, const gfx::Rect& bounds);
private:
+ // True if the action is in the hidden state.
+ bool hidden_;
+
// The title text to use for tooltips and labels.
std::string title_;
« no previous file with comments | « chrome/common/extensions/docs/pageAction.html ('k') | chrome/renderer/extensions/extension_process_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698