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

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

Issue 306044: Refactor implementation of BrowserActions, and add support for (Closed)
Patch Set: Make it work on linux too 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
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 38da54667a7beba46bf2b19a8a72a3a7a3dda22a..4a9fcd966b36b3baedfa7b99f0c88874382d4fbe 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_;
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698