summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 04:35:08 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 04:35:08 +0000
commit92c6f9b9eac950c487f580709e3aab03843d15bc (patch)
tree4f25ceede36cf3655de577a48281910752f67262 /chrome/common/extensions/extension.h
parent20ee7a74a7587986ed5db9b13aac2a78a5f0bdfc (diff)
downloadchromium_src-92c6f9b9eac950c487f580709e3aab03843d15bc.zip
chromium_src-92c6f9b9eac950c487f580709e3aab03843d15bc.tar.gz
chromium_src-92c6f9b9eac950c487f580709e3aab03843d15bc.tar.bz2
Refactor BrowserActions, and add support for
tab-specific state. Future changelists will move Page Actions over to ExtensionAction2, then replace ExtensionAction and ExtensionActionState with ExtensionAction2. Also, fix a bug in setIcon({path:...}) where it would work only the first time. BUG=24669,24472 Review URL: http://codereview.chromium.org/306044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension.h')
-rw-r--r--chrome/common/extensions/extension.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 38da546..4a9fcd9 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -16,6 +16,7 @@
#include "base/version.h"
#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/common/extensions/extension_action.h"
+#include "chrome/common/extensions/extension_action2.h"
#include "chrome/common/extensions/extension_message_bundle.h"
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/extensions/user_script.h"
@@ -191,10 +192,7 @@ class Extension {
const std::string& description() const { return description_; }
const UserScriptList& content_scripts() const { return content_scripts_; }
ExtensionAction* page_action() const { return page_action_.get(); }
- ExtensionAction* browser_action() const { return browser_action_.get(); }
- ExtensionActionState* browser_action_state() {
- return browser_action_state_.get();
- }
+ ExtensionAction2* browser_action() const { return browser_action_.get(); }
const std::vector<PrivacyBlacklistInfo>& privacy_blacklists() const {
return privacy_blacklists_;
}
@@ -288,6 +286,12 @@ class Extension {
std::string* error,
ExtensionAction::ExtensionActionType action_type);
+ // Helper method to load an ExtensionAction2 from the page_action or
+ // browser_action entries in the manifest.
+ // TODO(aa): ExtensionAction2 should replace ExtensionAction completely.
+ ExtensionAction2* LoadExtensionAction2Helper(
+ const DictionaryValue* extension_action, std::string* error);
+
// Figures out if a source contains keys not associated with themes - we
// don't want to allow scripts and such to be bundled with themes.
bool ContainsNonThemeKeys(const DictionaryValue& source);
@@ -325,10 +329,7 @@ class Extension {
scoped_ptr<ExtensionAction> page_action_;
// The extension's browser action, if any.
- scoped_ptr<ExtensionAction> browser_action_;
-
- // The state of the browser action. Valid iff browser_action_ is non-NULL.
- scoped_ptr<ExtensionActionState> browser_action_state_;
+ scoped_ptr<ExtensionAction2> browser_action_;
// Optional list of privacy blacklistrom.
std::vector<PrivacyBlacklistInfo> privacy_blacklists_;