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

Unified Diff: src/extensions/i18n/locale.h

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 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
« no previous file with comments | « src/extensions/i18n/i18n-utils.js ('k') | src/extensions/i18n/locale.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/locale.h
diff --git a/src/extensions/i18n/i18n-extension.h b/src/extensions/i18n/locale.h
similarity index 63%
copy from src/extensions/i18n/i18n-extension.h
copy to src/extensions/i18n/locale.h
index 050c336a67a21fd6cb32892e14215cac11971111..c39568e5d9d69104b8b4d3dbb35ca197a813c9a3 100644
--- a/src/extensions/i18n/i18n-extension.h
+++ b/src/extensions/i18n/locale.h
@@ -26,26 +26,31 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// limitations under the License.
-#ifndef V8_EXTENSIONS_I18N_I18N_EXTENSION_H_
-#define V8_EXTENSIONS_I18N_I18N_EXTENSION_H_
+#ifndef V8_EXTENSIONS_I18N_SRC_LOCALE_H_
+#define V8_EXTENSIONS_I18N_SRC_LOCALE_H_
+#include "unicode/uversion.h"
#include "v8.h"
namespace v8_i18n {
-class Extension : public v8::Extension {
- public:
- Extension();
+// Canonicalizes the BCP47 language tag using BCP47 rules.
+// Returns 'invalid-tag' in case input was not well formed.
+void JSCanonicalizeLanguageTag(const v8::FunctionCallbackInfo<v8::Value>& args);
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
- v8::Handle<v8::String> name);
+// Returns a list of available locales for collator, date or number formatter.
+void JSAvailableLocalesOf(const v8::FunctionCallbackInfo<v8::Value>& args);
- static void Register();
+// Returns default ICU locale.
+void JSGetDefaultICULocale(const v8::FunctionCallbackInfo<v8::Value>& args);
- private:
- static Extension* extension_;
-};
+// Returns an array of objects, that have maximized and base names of inputs.
+// Unicode extensions are dropped from both.
+// Input: ['zh-TW-u-nu-thai', 'sr']
+// Output: [{maximized: 'zh-Hant-TW', base: 'zh-TW'},
+// {maximized: 'sr-Cyrl-RS', base: 'sr'}]
+void JSGetLanguageTagVariants(const v8::FunctionCallbackInfo<v8::Value>& args);
} // namespace v8_i18n
-#endif // V8_EXTENSIONS_I18N_I18N_EXTENSION_H_
+#endif // V8_EXTENSIONS_I18N_LOCALE_H_
« no previous file with comments | « src/extensions/i18n/i18n-utils.js ('k') | src/extensions/i18n/locale.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698