| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project 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 // limitations under the License. | 4 // limitations under the License. |
| 5 | 5 |
| 6 #ifndef V8_I18N_H_ | 6 #ifndef V8_I18N_H_ |
| 7 #define V8_I18N_H_ | 7 #define V8_I18N_H_ |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 #include "unicode/uversion.h" | 10 #include "unicode/uversion.h" |
| 11 | 11 |
| 12 namespace U_ICU_NAMESPACE { | 12 namespace U_ICU_NAMESPACE { |
| 13 #if !UCONFIG_NO_BREAK_ITERATION |
| 13 class BreakIterator; | 14 class BreakIterator; |
| 15 #endif |
| 14 class Collator; | 16 class Collator; |
| 15 class DecimalFormat; | 17 class DecimalFormat; |
| 16 class SimpleDateFormat; | 18 class SimpleDateFormat; |
| 17 } | 19 } |
| 18 | 20 |
| 19 namespace v8 { | 21 namespace v8 { |
| 20 namespace internal { | 22 namespace internal { |
| 21 | 23 |
| 22 class I18N { | 24 class I18N { |
| 23 public: | 25 public: |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 97 |
| 96 // Release memory we allocated for the Collator once the JS object that holds | 98 // Release memory we allocated for the Collator once the JS object that holds |
| 97 // the pointer gets garbage collected. | 99 // the pointer gets garbage collected. |
| 98 static void DeleteCollator( | 100 static void DeleteCollator( |
| 99 const v8::WeakCallbackData<v8::Value, void>& data); | 101 const v8::WeakCallbackData<v8::Value, void>& data); |
| 100 | 102 |
| 101 private: | 103 private: |
| 102 Collator(); | 104 Collator(); |
| 103 }; | 105 }; |
| 104 | 106 |
| 107 #if !UCONFIG_NO_BREAK_ITERATION |
| 105 class BreakIterator { | 108 class BreakIterator { |
| 106 public: | 109 public: |
| 107 // Create a BreakIterator for the specificied locale and options. Returns the | 110 // Create a BreakIterator for the specificied locale and options. Returns the |
| 108 // resolved settings for the locale / options. | 111 // resolved settings for the locale / options. |
| 109 static icu::BreakIterator* InitializeBreakIterator( | 112 static icu::BreakIterator* InitializeBreakIterator( |
| 110 Isolate* isolate, | 113 Isolate* isolate, |
| 111 Handle<String> locale, | 114 Handle<String> locale, |
| 112 Handle<JSObject> options, | 115 Handle<JSObject> options, |
| 113 Handle<JSObject> resolved); | 116 Handle<JSObject> resolved); |
| 114 | 117 |
| 115 // Unpacks break iterator object from corresponding JavaScript object. | 118 // Unpacks break iterator object from corresponding JavaScript object. |
| 116 static icu::BreakIterator* UnpackBreakIterator(Isolate* isolate, | 119 static icu::BreakIterator* UnpackBreakIterator(Isolate* isolate, |
| 117 Handle<JSObject> obj); | 120 Handle<JSObject> obj); |
| 118 | 121 |
| 119 // Release memory we allocated for the BreakIterator once the JS object that | 122 // Release memory we allocated for the BreakIterator once the JS object that |
| 120 // holds the pointer gets garbage collected. | 123 // holds the pointer gets garbage collected. |
| 121 static void DeleteBreakIterator( | 124 static void DeleteBreakIterator( |
| 122 const v8::WeakCallbackData<v8::Value, void>& data); | 125 const v8::WeakCallbackData<v8::Value, void>& data); |
| 123 | 126 |
| 124 private: | 127 private: |
| 125 BreakIterator(); | 128 BreakIterator(); |
| 126 }; | 129 }; |
| 127 | 130 #endif |
| 128 } } // namespace v8::internal | 131 } } // namespace v8::internal |
| 129 | 132 |
| 130 #endif // V8_I18N_H_ | 133 #endif // V8_I18N_H_ |
| OLD | NEW |