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

Side by Side Diff: src/i18n.h

Issue 22764007: Move i18n break iterator C++ code to runtime (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/extensions/i18n/i18n-utils.cc ('k') | src/i18n.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 // limitations under the License. 27 // limitations under the License.
28 28
29 #ifndef V8_I18N_H_ 29 #ifndef V8_I18N_H_
30 #define V8_I18N_H_ 30 #define V8_I18N_H_
31 31
32 #include "unicode/uversion.h" 32 #include "unicode/uversion.h"
33 #include "v8.h" 33 #include "v8.h"
34 34
35 namespace U_ICU_NAMESPACE { 35 namespace U_ICU_NAMESPACE {
36 class BreakIterator;
36 class Collator; 37 class Collator;
37 class DecimalFormat; 38 class DecimalFormat;
38 class SimpleDateFormat; 39 class SimpleDateFormat;
39 } 40 }
40 41
41 namespace v8 { 42 namespace v8 {
42 namespace internal { 43 namespace internal {
43 44
44 class I18N { 45 class I18N {
45 public: 46 public:
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 118
118 // Release memory we allocated for the Collator once the JS object that holds 119 // Release memory we allocated for the Collator once the JS object that holds
119 // the pointer gets garbage collected. 120 // the pointer gets garbage collected.
120 static void DeleteCollator(v8::Isolate* isolate, 121 static void DeleteCollator(v8::Isolate* isolate,
121 Persistent<v8::Object>* object, 122 Persistent<v8::Object>* object,
122 void* param); 123 void* param);
123 private: 124 private:
124 Collator(); 125 Collator();
125 }; 126 };
126 127
128 class BreakIterator {
129 public:
130 // Create a BreakIterator for the specificied locale and options. Returns the
131 // resolved settings for the locale / options.
132 static icu::BreakIterator* InitializeBreakIterator(
133 Isolate* isolate,
134 Handle<String> locale,
135 Handle<JSObject> options,
136 Handle<JSObject> resolved);
137
138 // Unpacks break iterator object from corresponding JavaScript object.
139 static icu::BreakIterator* UnpackBreakIterator(Isolate* isolate,
140 Handle<JSObject> obj);
141
142 // Release memory we allocated for the BreakIterator once the JS object that
143 // holds the pointer gets garbage collected.
144 static void DeleteBreakIterator(v8::Isolate* isolate,
145 Persistent<v8::Value>* object,
146 void* param);
147
148 private:
149 BreakIterator();
150 };
151
127 } } // namespace v8::internal 152 } } // namespace v8::internal
128 153
129 #endif // V8_I18N_H_ 154 #endif // V8_I18N_H_
OLDNEW
« no previous file with comments | « src/extensions/i18n/i18n-utils.cc ('k') | src/i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698