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

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

Issue 202063: Implemented the rest of loading/parsing logic for extension i18n:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/chrome.gyp ('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
===================================================================
--- chrome/common/extensions/extension.h (revision 25781)
+++ 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/common/extensions/user_script.h"
+#include "chrome/browser/extensions/extension_message_bundle.h"
#include "chrome/browser/extensions/user_script_master.h"
+#include "chrome/common/extensions/user_script.h"
#include "chrome/common/extensions/url_pattern.h"
#include "chrome/common/page_action.h"
#include "googleurl/src/gurl.h"
@@ -247,21 +248,14 @@
return manifest_value_.get();
}
- // Returns a list of all locales supported by the extension.
- const std::set<std::string>& supported_locales() const {
- return supported_locales_;
+ // Getter/setter for l10n message bundle.
+ const ExtensionMessageBundle* message_bundle() const {
+ return message_bundle_.get();
}
- // Add locale to the list of supported locales.
- void AddSupportedLocale(const std::string& supported_locale) {
- supported_locales_.insert(supported_locale);
+ void set_message_bundle(ExtensionMessageBundle* message_bundle) {
+ message_bundle_.reset(message_bundle);
}
- // Getter/setter for a default_locale_.
- const std::string& default_locale() const { return default_locale_; }
- void set_default_locale(const std::string& default_locale) {
- default_locale_ = default_locale;
- }
-
// Chrome URL overrides (see ExtensionOverrideUI).
DictionaryValue* GetChromeURLOverrides() const {
return chrome_url_overrides_.get();
@@ -381,12 +375,9 @@
// A copy of the manifest that this extension was created from.
scoped_ptr<DictionaryValue> manifest_value_;
- // List of all locales extension supports.
- std::set<std::string> supported_locales_;
+ // Handles the l10n messages replacement and parsing.
+ scoped_ptr<ExtensionMessageBundle> message_bundle_;
- // Default locale, used for fallback.
- std::string default_locale_;
-
// A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs
// which override the handling of those URLs.
scoped_ptr<DictionaryValue> chrome_url_overrides_;
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698