summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_action.h
diff options
context:
space:
mode:
authorerikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 20:19:20 +0000
committererikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 20:19:20 +0000
commit2d8d923da42df61e9d65942945456d4b9304ef8e (patch)
tree21150546eca2423887f1cca5f9fe7a58ef08224a /chrome/common/extensions/extension_action.h
parent9e0dfa8ae69f71441d62f725441f7075f791bd09 (diff)
downloadchromium_src-2d8d923da42df61e9d65942945456d4b9304ef8e.zip
chromium_src-2d8d923da42df61e9d65942945456d4b9304ef8e.tar.gz
chromium_src-2d8d923da42df61e9d65942945456d4b9304ef8e.tar.bz2
Add simple popup support to browser actions. This will create a popup HTML window that extends below a browser action button when the browser is clicked. When it loses focus, it is automatically dismissed.
BUG=23596 TEST=none Review URL: http://codereview.chromium.org/258011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_action.h')
-rw-r--r--chrome/common/extensions/extension_action.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension_action.h b/chrome/common/extensions/extension_action.h
index f091487..630671c 100644
--- a/chrome/common/extensions/extension_action.h
+++ b/chrome/common/extensions/extension_action.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "googleurl/src/gurl.h"
class ExtensionAction {
public:
@@ -42,6 +43,12 @@ class ExtensionAction {
icon_paths_.push_back(icon_path);
}
+ const GURL& popup_url() const { return popup_url_; }
+ void set_popup_url(const GURL& url) { popup_url_ = url; }
+
+ const int popup_height() const { return popup_height_; }
+ void set_popup_height(int height) { popup_height_ = height; }
+
private:
static int next_command_id_;
@@ -65,6 +72,10 @@ class ExtensionAction {
// An integer for use with the browser's command system. These should always
// be in the range [IDC_BROWSER_ACTION_FIRST, IDC_BROWSER_ACTION_LAST].
int command_id_;
+
+ // If the action has a popup, it has a URL and a height.
+ GURL popup_url_;
+ int popup_height_;
};
typedef std::map<std::string, ExtensionAction*> ExtensionActionMap;