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