| 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 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3734 void operator=(const Locker&); | 3734 void operator=(const Locker&); |
| 3735 }; | 3735 }; |
| 3736 | 3736 |
| 3737 | 3737 |
| 3738 /** | 3738 /** |
| 3739 * An interface for exporting data from V8, using "push" model. | 3739 * An interface for exporting data from V8, using "push" model. |
| 3740 */ | 3740 */ |
| 3741 class V8EXPORT OutputStream { // NOLINT | 3741 class V8EXPORT OutputStream { // NOLINT |
| 3742 public: | 3742 public: |
| 3743 enum OutputEncoding { | 3743 enum OutputEncoding { |
| 3744 kAscii = 0 // 7-bit ASCII. | 3744 kAscii = 0, // 7-bit ASCII. |
| 3745 kUint32 = 1 |
| 3745 }; | 3746 }; |
| 3746 enum WriteResult { | 3747 enum WriteResult { |
| 3747 kContinue = 0, | 3748 kContinue = 0, |
| 3748 kAbort = 1 | 3749 kAbort = 1 |
| 3749 }; | 3750 }; |
| 3750 virtual ~OutputStream() {} | 3751 virtual ~OutputStream() {} |
| 3751 /** Notify about the end of stream. */ | 3752 /** Notify about the end of stream. */ |
| 3752 virtual void EndOfStream() = 0; | 3753 virtual void EndOfStream() = 0; |
| 3753 /** Get preferred output chunk size. Called only once. */ | 3754 /** Get preferred output chunk size. Called only once. */ |
| 3754 virtual int GetChunkSize() { return 1024; } | 3755 virtual int GetChunkSize() { return 1024; } |
| 3755 /** Get preferred output encoding. Called only once. */ | 3756 /** Get preferred output encoding. Called only once. */ |
| 3756 virtual OutputEncoding GetOutputEncoding() { return kAscii; } | 3757 virtual OutputEncoding GetOutputEncoding() { return kAscii; } |
| 3757 /** | 3758 /** |
| 3758 * Writes the next chunk of snapshot data into the stream. Writing | 3759 * Writes the next chunk of snapshot data into the stream. Writing |
| 3759 * can be stopped by returning kAbort as function result. EndOfStream | 3760 * can be stopped by returning kAbort as function result. EndOfStream |
| 3760 * will not be called in case writing was aborted. | 3761 * will not be called in case writing was aborted. |
| 3761 */ | 3762 */ |
| 3762 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; | 3763 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; |
| 3764 |
| 3765 /** |
| 3766 * Writes the next chunk of snapshot data into the stream. Writing |
| 3767 * can be stopped by returning kAbort as function result. EndOfStream |
| 3768 * will not be called in case writing was aborted. |
| 3769 */ |
| 3770 virtual WriteResult WriteUint32Chunk(uint32_t* data, int size) = 0; |
| 3763 }; | 3771 }; |
| 3764 | 3772 |
| 3765 | 3773 |
| 3766 /** | 3774 /** |
| 3767 * An interface for reporting progress and controlling long-running | 3775 * An interface for reporting progress and controlling long-running |
| 3768 * activities. | 3776 * activities. |
| 3769 */ | 3777 */ |
| 3770 class V8EXPORT ActivityControl { // NOLINT | 3778 class V8EXPORT ActivityControl { // NOLINT |
| 3771 public: | 3779 public: |
| 3772 enum ControlOption { | 3780 enum ControlOption { |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4311 | 4319 |
| 4312 | 4320 |
| 4313 } // namespace v8 | 4321 } // namespace v8 |
| 4314 | 4322 |
| 4315 | 4323 |
| 4316 #undef V8EXPORT | 4324 #undef V8EXPORT |
| 4317 #undef TYPE_CHECK | 4325 #undef TYPE_CHECK |
| 4318 | 4326 |
| 4319 | 4327 |
| 4320 #endif // V8_H_ | 4328 #endif // V8_H_ |
| OLD | NEW |