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

Unified Diff: src/extensions/experimental/i18n-extension.cc

Issue 6332022: Adding vendor prefix to Locale class (becoming v8Locale) to minimize risk of ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/experimental/i18n-extension.cc
===================================================================
--- src/extensions/experimental/i18n-extension.cc (revision 6529)
+++ src/extensions/experimental/i18n-extension.cc (working copy)
@@ -39,8 +39,9 @@
I18NExtension* I18NExtension::extension_ = NULL;
// TODO(cira): maybe move JS code to a .js file and generata cc files from it?
+// TODO(cira): Remove v8 prefix from v8Locale once we have stable API.
const char* const I18NExtension::kSource =
- "Locale = function(optLocale) {"
+ "v8Locale = function(optLocale) {"
" native function NativeJSLocale();"
" var properties = NativeJSLocale(optLocale);"
" this.locale = properties.locale;"
@@ -48,41 +49,41 @@
" this.script = properties.script;"
" this.region = properties.region;"
"};"
- "Locale.availableLocales = function() {"
+ "v8Locale.availableLocales = function() {"
" native function NativeJSAvailableLocales();"
" return NativeJSAvailableLocales();"
"};"
- "Locale.prototype.maximizedLocale = function() {"
+ "v8Locale.prototype.maximizedLocale = function() {"
" native function NativeJSMaximizedLocale();"
- " return new Locale(NativeJSMaximizedLocale(this.locale));"
+ " return new v8Locale(NativeJSMaximizedLocale(this.locale));"
"};"
- "Locale.prototype.minimizedLocale = function() {"
+ "v8Locale.prototype.minimizedLocale = function() {"
" native function NativeJSMinimizedLocale();"
- " return new Locale(NativeJSMinimizedLocale(this.locale));"
+ " return new v8Locale(NativeJSMinimizedLocale(this.locale));"
"};"
- "Locale.prototype.displayLocale_ = function(displayLocale) {"
+ "v8Locale.prototype.displayLocale_ = function(displayLocale) {"
" var result = this.locale;"
" if (displayLocale !== undefined) {"
" result = displayLocale.locale;"
" }"
" return result;"
"};"
- "Locale.prototype.displayLanguage = function(optDisplayLocale) {"
+ "v8Locale.prototype.displayLanguage = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayLanguage();"
" return NativeJSDisplayLanguage(this.locale, displayLocale);"
"};"
- "Locale.prototype.displayScript = function(optDisplayLocale) {"
+ "v8Locale.prototype.displayScript = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayScript();"
" return NativeJSDisplayScript(this.locale, displayLocale);"
"};"
- "Locale.prototype.displayRegion = function(optDisplayLocale) {"
+ "v8Locale.prototype.displayRegion = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayRegion();"
" return NativeJSDisplayRegion(this.locale, displayLocale);"
"};"
- "Locale.prototype.displayName = function(optDisplayLocale) {"
+ "v8Locale.prototype.displayName = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayName();"
" return NativeJSDisplayName(this.locale, displayLocale);"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698