| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 void writeFileListIndex(const Vector<int>& blobIndices); | 141 void writeFileListIndex(const Vector<int>& blobIndices); |
| 142 void writeArrayBuffer(const DOMArrayBuffer&); | 142 void writeArrayBuffer(const DOMArrayBuffer&); |
| 143 void writeArrayBufferView(const DOMArrayBufferView&); | 143 void writeArrayBufferView(const DOMArrayBufferView&); |
| 144 void doWriteImageData(uint32_t width, uint32_t height, const uint8_t* pixelD
ata, uint32_t pixelDataLength); | 144 void doWriteImageData(uint32_t width, uint32_t height, const uint8_t* pixelD
ata, uint32_t pixelDataLength); |
| 145 void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelDat
a, uint32_t pixelDataLength); | 145 void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelDat
a, uint32_t pixelDataLength); |
| 146 void writeImageBitmap(uint32_t width, uint32_t height, uint32_t isOriginClea
n, uint32_t isPremultiplied, const uint8_t* pixelData, uint32_t pixelDataLength)
; | 146 void writeImageBitmap(uint32_t width, uint32_t height, uint32_t isOriginClea
n, uint32_t isPremultiplied, const uint8_t* pixelData, uint32_t pixelDataLength)
; |
| 147 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags); | 147 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags); |
| 148 void writeTransferredMessagePort(uint32_t index); | 148 void writeTransferredMessagePort(uint32_t index); |
| 149 void writeTransferredArrayBuffer(uint32_t index); | 149 void writeTransferredArrayBuffer(uint32_t index); |
| 150 void writeTransferredImageBitmap(uint32_t index); | 150 void writeTransferredImageBitmap(uint32_t index); |
| 151 void writeTransferredOffscreenCanvas(uint32_t width, uint32_t height, uint32
_t canvasId, uint32_t clientId, uint32_t localId, uint64_t nonce); | 151 void writeTransferredOffscreenCanvas(uint32_t width, uint32_t height, uint32
_t canvasId, uint32_t clientId, uint32_t localId, uint64_t nonceHigh, uint64_t n
onceLow); |
| 152 void writeTransferredSharedArrayBuffer(uint32_t index); | 152 void writeTransferredSharedArrayBuffer(uint32_t index); |
| 153 void writeObjectReference(uint32_t reference); | 153 void writeObjectReference(uint32_t reference); |
| 154 void writeObject(uint32_t numProperties); | 154 void writeObject(uint32_t numProperties); |
| 155 void writeSparseArray(uint32_t numProperties, uint32_t length); | 155 void writeSparseArray(uint32_t numProperties, uint32_t length); |
| 156 void writeDenseArray(uint32_t numProperties, uint32_t length); | 156 void writeDenseArray(uint32_t numProperties, uint32_t length); |
| 157 void writeReferenceCount(uint32_t numberOfReferences); | 157 void writeReferenceCount(uint32_t numberOfReferences); |
| 158 void writeGenerateFreshObject(); | 158 void writeGenerateFreshObject(); |
| 159 void writeGenerateFreshSparseArray(uint32_t length); | 159 void writeGenerateFreshSparseArray(uint32_t length); |
| 160 void writeGenerateFreshDenseArray(uint32_t length); | 160 void writeGenerateFreshDenseArray(uint32_t length); |
| 161 void writeGenerateFreshMap(); | 161 void writeGenerateFreshMap(); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 bool newObject(); | 586 bool newObject(); |
| 587 bool completeObject(uint32_t numProperties, v8::Local<v8::Value>*); | 587 bool completeObject(uint32_t numProperties, v8::Local<v8::Value>*); |
| 588 bool completeSparseArray(uint32_t numProperties, uint32_t length, v8::Local<
v8::Value>*); | 588 bool completeSparseArray(uint32_t numProperties, uint32_t length, v8::Local<
v8::Value>*); |
| 589 bool completeDenseArray(uint32_t numProperties, uint32_t length, v8::Local<v
8::Value>*); | 589 bool completeDenseArray(uint32_t numProperties, uint32_t length, v8::Local<v
8::Value>*); |
| 590 bool completeMap(uint32_t length, v8::Local<v8::Value>*); | 590 bool completeMap(uint32_t length, v8::Local<v8::Value>*); |
| 591 bool completeSet(uint32_t length, v8::Local<v8::Value>*); | 591 bool completeSet(uint32_t length, v8::Local<v8::Value>*); |
| 592 void pushObjectReference(const v8::Local<v8::Value>&); | 592 void pushObjectReference(const v8::Local<v8::Value>&); |
| 593 bool tryGetTransferredMessagePort(uint32_t index, v8::Local<v8::Value>*); | 593 bool tryGetTransferredMessagePort(uint32_t index, v8::Local<v8::Value>*); |
| 594 bool tryGetTransferredArrayBuffer(uint32_t index, v8::Local<v8::Value>*); | 594 bool tryGetTransferredArrayBuffer(uint32_t index, v8::Local<v8::Value>*); |
| 595 bool tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>*); | 595 bool tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>*); |
| 596 bool tryGetTransferredOffscreenCanvas(uint32_t width, uint32_t height, uint3
2_t canvasId, uint32_t clientId, uint32_t localId, uint64_t nonce, v8::Local<v8:
:Value>*); | 596 bool tryGetTransferredOffscreenCanvas(uint32_t width, uint32_t height, uint3
2_t canvasId, uint32_t clientId, uint32_t localId, uint64_t nonceHigh, uint64_t
nonceLow, v8::Local<v8::Value>*); |
| 597 bool tryGetTransferredSharedArrayBuffer(uint32_t index, v8::Local<v8::Value>
*); | 597 bool tryGetTransferredSharedArrayBuffer(uint32_t index, v8::Local<v8::Value>
*); |
| 598 bool tryGetObjectFromObjectReference(uint32_t reference, v8::Local<v8::Value
>*); | 598 bool tryGetObjectFromObjectReference(uint32_t reference, v8::Local<v8::Value
>*); |
| 599 uint32_t objectReferenceCount(); | 599 uint32_t objectReferenceCount(); |
| 600 | 600 |
| 601 protected: | 601 protected: |
| 602 SerializedScriptValueReader& reader() { return m_reader; } | 602 SerializedScriptValueReader& reader() { return m_reader; } |
| 603 virtual bool read(v8::Local<v8::Value>*); | 603 virtual bool read(v8::Local<v8::Value>*); |
| 604 | 604 |
| 605 private: | 605 private: |
| 606 bool initializeObject(v8::Local<v8::Object>, uint32_t numProperties, v8::Loc
al<v8::Value>*); | 606 bool initializeObject(v8::Local<v8::Object>, uint32_t numProperties, v8::Loc
al<v8::Value>*); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 625 ArrayBufferContentsArray* m_arrayBufferContents; | 625 ArrayBufferContentsArray* m_arrayBufferContents; |
| 626 ImageBitmapContentsArray* m_imageBitmapContents; | 626 ImageBitmapContentsArray* m_imageBitmapContents; |
| 627 Vector<v8::Local<v8::Value>> m_arrayBuffers; | 627 Vector<v8::Local<v8::Value>> m_arrayBuffers; |
| 628 Vector<v8::Local<v8::Value>> m_imageBitmaps; | 628 Vector<v8::Local<v8::Value>> m_imageBitmaps; |
| 629 uint32_t m_version; | 629 uint32_t m_version; |
| 630 }; | 630 }; |
| 631 | 631 |
| 632 } // namespace blink | 632 } // namespace blink |
| 633 | 633 |
| 634 #endif // ScriptValueSerializer_h | 634 #endif // ScriptValueSerializer_h |
| OLD | NEW |