| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 public: | 44 public: |
| 45 static v8::Handle<v8::Value> JSBreakIterator(const v8::Arguments& args); | 45 static v8::Handle<v8::Value> JSBreakIterator(const v8::Arguments& args); |
| 46 | 46 |
| 47 // Helper methods for various bindings. | 47 // Helper methods for various bindings. |
| 48 | 48 |
| 49 // Unpacks break iterator object from corresponding JavaScript object. | 49 // Unpacks break iterator object from corresponding JavaScript object. |
| 50 static icu::BreakIterator* UnpackBreakIterator(v8::Handle<v8::Object> obj); | 50 static icu::BreakIterator* UnpackBreakIterator(v8::Handle<v8::Object> obj); |
| 51 | 51 |
| 52 // Deletes the old value and sets the adopted text in | 52 // Deletes the old value and sets the adopted text in |
| 53 // corresponding JavaScript object. | 53 // corresponding JavaScript object. |
| 54 static icu::UnicodeString* ResetAdoptedText(v8::Handle<v8::Object> obj, | 54 static UnicodeString* ResetAdoptedText(v8::Handle<v8::Object> obj, |
| 55 v8::Handle<v8::Value> text_value); | 55 v8::Handle<v8::Value> text_value); |
| 56 | 56 |
| 57 // Release memory we allocated for the BreakIterator once the JS object that | 57 // Release memory we allocated for the BreakIterator once the JS object that |
| 58 // holds the pointer gets garbage collected. | 58 // holds the pointer gets garbage collected. |
| 59 static void DeleteBreakIterator(v8::Persistent<v8::Value> object, | 59 static void DeleteBreakIterator(v8::Persistent<v8::Value> object, |
| 60 void* param); | 60 void* param); |
| 61 | 61 |
| 62 // Assigns new text to the iterator. | 62 // Assigns new text to the iterator. |
| 63 static v8::Handle<v8::Value> BreakIteratorAdoptText( | 63 static v8::Handle<v8::Value> BreakIteratorAdoptText( |
| 64 const v8::Arguments& args); | 64 const v8::Arguments& args); |
| 65 | 65 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 BreakIterator() {} | 82 BreakIterator() {} |
| 83 | 83 |
| 84 static v8::Persistent<v8::FunctionTemplate> break_iterator_template_; | 84 static v8::Persistent<v8::FunctionTemplate> break_iterator_template_; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } } // namespace v8::internal | 87 } } // namespace v8::internal |
| 88 | 88 |
| 89 #endif // V8_EXTENSIONS_EXPERIMENTAL_BREAK_ITERATOR_H_ | 89 #endif // V8_EXTENSIONS_EXPERIMENTAL_BREAK_ITERATOR_H_ |
| OLD | NEW |