| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGE_BUNDLE_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGE_BUNDLE_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGE_BUNDLE_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGE_BUNDLE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Reserved message names in the dictionary. | 33 // Reserved message names in the dictionary. |
| 34 // Update i18n documentation when adding new reserved value. | 34 // Update i18n documentation when adding new reserved value. |
| 35 static const char* kUILocaleKey; | 35 static const char* kUILocaleKey; |
| 36 // See http://code.google.com/apis/gadgets/docs/i18n.html#BIDI for | 36 // See http://code.google.com/apis/gadgets/docs/i18n.html#BIDI for |
| 37 // description. | 37 // description. |
| 38 // TODO(cira): point to chrome docs once they are out. | 38 // TODO(cira): point to chrome docs once they are out. |
| 39 static const char* kBidiDirectionKey; | 39 static const char* kBidiDirectionKey; |
| 40 static const char* kBidiReversedDirectionKey; | 40 static const char* kBidiReversedDirectionKey; |
| 41 static const char* kBidiStartEdgeKey; | 41 static const char* kBidiStartEdgeKey; |
| 42 static const char* kBidiEndEdgeKey; | 42 static const char* kBidiEndEdgeKey; |
| 43 // Extension id gets added in the |
| 44 // browser/renderer_host/resource_message_filter.cc to enable message |
| 45 // replacement for non-localized extensions. |
| 46 static const char* kExtensionIdKey; |
| 43 | 47 |
| 44 // Values for some of the reserved messages. | 48 // Values for some of the reserved messages. |
| 45 static const char* kBidiLeftEdgeValue; | 49 static const char* kBidiLeftEdgeValue; |
| 46 static const char* kBidiRightEdgeValue; | 50 static const char* kBidiRightEdgeValue; |
| 47 | 51 |
| 48 // Creates ExtensionMessageBundle or returns NULL if there was an error. | 52 // Creates ExtensionMessageBundle or returns NULL if there was an error. |
| 49 // Expects locale_catalogs to be sorted from more specific to less specific, | 53 // Expects locale_catalogs to be sorted from more specific to less specific, |
| 50 // with default catalog at the end. | 54 // with default catalog at the end. |
| 51 static ExtensionMessageBundle* Create(const CatalogVector& locale_catalogs, | 55 static ExtensionMessageBundle* Create(const CatalogVector& locale_catalogs, |
| 52 std::string* error); | 56 std::string* error); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 ExtensionToL10nMessagesMap messages_map; | 170 ExtensionToL10nMessagesMap messages_map; |
| 167 }; | 171 }; |
| 168 | 172 |
| 169 // Returns the extension_id to messages map. | 173 // Returns the extension_id to messages map. |
| 170 ExtensionToL10nMessagesMap* GetExtensionToL10nMessagesMap(); | 174 ExtensionToL10nMessagesMap* GetExtensionToL10nMessagesMap(); |
| 171 | 175 |
| 172 // Returns message map that matches given extension_id, or NULL. | 176 // Returns message map that matches given extension_id, or NULL. |
| 173 L10nMessagesMap* GetL10nMessagesMap(const std::string extension_id); | 177 L10nMessagesMap* GetL10nMessagesMap(const std::string extension_id); |
| 174 | 178 |
| 175 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGE_BUNDLE_H_ | 179 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGE_BUNDLE_H_ |
| OLD | NEW |