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

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

Issue 173487: Implemented the rest of loading/parsing logic for extension i18n:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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.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.
« chrome/browser/extensions/extension_message_handler.cc ('K') | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698