| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 | 4 |
| 5 #ifndef ScriptValueSerializer_h | 5 #ifndef ScriptValueSerializer_h |
| 6 #define ScriptValueSerializer_h | 6 #define ScriptValueSerializer_h |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "bindings/core/v8/SerializationTag.h" | 9 #include "bindings/core/v8/SerializationTag.h" |
| 10 #include "bindings/core/v8/SerializedScriptValue.h" | 10 #include "bindings/core/v8/SerializedScriptValue.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags); | 160 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags); |
| 161 void writeTransferredMessagePort(uint32_t index); | 161 void writeTransferredMessagePort(uint32_t index); |
| 162 void writeTransferredArrayBuffer(uint32_t index); | 162 void writeTransferredArrayBuffer(uint32_t index); |
| 163 void writeTransferredImageBitmap(uint32_t index); | 163 void writeTransferredImageBitmap(uint32_t index); |
| 164 void writeTransferredOffscreenCanvas(uint32_t width, | 164 void writeTransferredOffscreenCanvas(uint32_t width, |
| 165 uint32_t height, | 165 uint32_t height, |
| 166 uint32_t canvasId, | 166 uint32_t canvasId, |
| 167 uint32_t clientId, | 167 uint32_t clientId, |
| 168 uint32_t sinkId, | 168 uint32_t sinkId, |
| 169 uint32_t localId, | 169 uint32_t localId, |
| 170 uint64_t nonceHigh, | 170 uint64_t nonce); |
| 171 uint64_t nonceLow); | |
| 172 void writeTransferredSharedArrayBuffer(uint32_t index); | 171 void writeTransferredSharedArrayBuffer(uint32_t index); |
| 173 void writeObjectReference(uint32_t reference); | 172 void writeObjectReference(uint32_t reference); |
| 174 void writeObject(uint32_t numProperties); | 173 void writeObject(uint32_t numProperties); |
| 175 void writeSparseArray(uint32_t numProperties, uint32_t length); | 174 void writeSparseArray(uint32_t numProperties, uint32_t length); |
| 176 void writeDenseArray(uint32_t numProperties, uint32_t length); | 175 void writeDenseArray(uint32_t numProperties, uint32_t length); |
| 177 void writeReferenceCount(uint32_t numberOfReferences); | 176 void writeReferenceCount(uint32_t numberOfReferences); |
| 178 void writeGenerateFreshObject(); | 177 void writeGenerateFreshObject(); |
| 179 void writeGenerateFreshSparseArray(uint32_t length); | 178 void writeGenerateFreshSparseArray(uint32_t length); |
| 180 void writeGenerateFreshDenseArray(uint32_t length); | 179 void writeGenerateFreshDenseArray(uint32_t length); |
| 181 void writeGenerateFreshMap(); | 180 void writeGenerateFreshMap(); |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 void pushObjectReference(const v8::Local<v8::Value>&); | 636 void pushObjectReference(const v8::Local<v8::Value>&); |
| 638 bool tryGetTransferredMessagePort(uint32_t index, v8::Local<v8::Value>*); | 637 bool tryGetTransferredMessagePort(uint32_t index, v8::Local<v8::Value>*); |
| 639 bool tryGetTransferredArrayBuffer(uint32_t index, v8::Local<v8::Value>*); | 638 bool tryGetTransferredArrayBuffer(uint32_t index, v8::Local<v8::Value>*); |
| 640 bool tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>*); | 639 bool tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>*); |
| 641 bool tryGetTransferredOffscreenCanvas(uint32_t width, | 640 bool tryGetTransferredOffscreenCanvas(uint32_t width, |
| 642 uint32_t height, | 641 uint32_t height, |
| 643 uint32_t canvasId, | 642 uint32_t canvasId, |
| 644 uint32_t clientId, | 643 uint32_t clientId, |
| 645 uint32_t sinkId, | 644 uint32_t sinkId, |
| 646 uint32_t localId, | 645 uint32_t localId, |
| 647 uint64_t nonceHigh, | 646 uint64_t nonce, |
| 648 uint64_t nonceLow, | |
| 649 v8::Local<v8::Value>*); | 647 v8::Local<v8::Value>*); |
| 650 bool tryGetTransferredSharedArrayBuffer(uint32_t index, | 648 bool tryGetTransferredSharedArrayBuffer(uint32_t index, |
| 651 v8::Local<v8::Value>*); | 649 v8::Local<v8::Value>*); |
| 652 bool tryGetObjectFromObjectReference(uint32_t reference, | 650 bool tryGetObjectFromObjectReference(uint32_t reference, |
| 653 v8::Local<v8::Value>*); | 651 v8::Local<v8::Value>*); |
| 654 uint32_t objectReferenceCount(); | 652 uint32_t objectReferenceCount(); |
| 655 | 653 |
| 656 protected: | 654 protected: |
| 657 SerializedScriptValueReader& reader() { return m_reader; } | 655 SerializedScriptValueReader& reader() { return m_reader; } |
| 658 virtual bool read(v8::Local<v8::Value>*); | 656 virtual bool read(v8::Local<v8::Value>*); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 681 ArrayBufferContentsArray* m_arrayBufferContents; | 679 ArrayBufferContentsArray* m_arrayBufferContents; |
| 682 ImageBitmapContentsArray* m_imageBitmapContents; | 680 ImageBitmapContentsArray* m_imageBitmapContents; |
| 683 Vector<v8::Local<v8::Value>> m_arrayBuffers; | 681 Vector<v8::Local<v8::Value>> m_arrayBuffers; |
| 684 Vector<v8::Local<v8::Value>> m_imageBitmaps; | 682 Vector<v8::Local<v8::Value>> m_imageBitmaps; |
| 685 uint32_t m_version; | 683 uint32_t m_version; |
| 686 }; | 684 }; |
| 687 | 685 |
| 688 } // namespace blink | 686 } // namespace blink |
| 689 | 687 |
| 690 #endif // ScriptValueSerializer_h | 688 #endif // ScriptValueSerializer_h |
| OLD | NEW |