Chromium Code Reviews| Index: chrome/common/extensions/extension.h |
| =================================================================== |
| --- chrome/common/extensions/extension.h (revision 24127) |
| +++ chrome/common/extensions/extension.h (working copy) |
| @@ -14,8 +14,9 @@ |
| #include "base/scoped_ptr.h" |
| #include "base/values.h" |
| #include "base/version.h" |
| +#include "chrome/browser/extensions/extension_message_handler.h" |
| +#include "chrome/browser/extensions/user_script_master.h" |
| #include "chrome/common/extensions/user_script.h" |
| -#include "chrome/browser/extensions/user_script_master.h" |
| #include "chrome/common/extensions/url_pattern.h" |
| #include "chrome/common/page_action.h" |
| #include "googleurl/src/gurl.h" |
| @@ -191,8 +192,14 @@ |
| // String representation of the version number. |
| const std::string VersionString() const; |
| const std::string& name() const { return name_; } |
| + // Sets name to a new value in case it got updated during l10n process. |
| + void set_name(const std::string& name) { name_ = name; } |
| const std::string& public_key() const { return public_key_; } |
| const std::string& description() const { return description_; } |
| + // Sets description to a new value in case it got updated during l10n process. |
| + void set_description(const std::string& description) { |
| + description_ = description; |
| + } |
| const UserScriptList& content_scripts() const { return content_scripts_; } |
| const PageActionMap& page_actions() const { return page_actions_; } |
| const std::vector<PrivacyBlacklistInfo>& privacy_blacklists() const { |
| @@ -256,6 +263,20 @@ |
| default_locale_ = default_locale; |
| } |
| + // Getter/setter for application_locale. |
| + const std::string& application_locale() const { return application_locale_; } |
| + void set_application_locale(const std::string& application_locale) { |
| + application_locale_ = application_locale; |
|
Aaron Boodman
2009/08/31 21:42:55
Why do we need to store a duplicate copy of the ap
|
| + } |
| + |
| + // Getter/setter for l10n message handler. |
| + const ExtensionMessageHandler* message_handler() const { |
| + return message_handler_.get(); |
| + } |
| + void set_message_handler(ExtensionMessageHandler* message_handler) { |
| + message_handler_.reset(message_handler); |
| + } |
| + |
| // Runtime data: |
| // Put dynamic data about the state of a running extension below. |
| @@ -376,6 +397,12 @@ |
| // Default locale, used for fallback. |
| std::string default_locale_; |
| + // Application locale (from l10n_util::GetApplicationLocale()). |
| + std::string application_locale_; |
| + |
| + // Handles the l10n messages replacement and parsing. |
| + scoped_ptr<ExtensionMessageHandler> message_handler_; |
| + |
| // Runtime data: |
| // True if the background page is ready. |