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 "bindings/core/v8/SerializationTag.h" | 8 #include "bindings/core/v8/SerializationTag.h" |
9 #include "bindings/core/v8/SerializedScriptValue.h" | 9 #include "bindings/core/v8/SerializedScriptValue.h" |
10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 void writeBlobIndex(int blobIndex); | 135 void writeBlobIndex(int blobIndex); |
136 void writeCompositorProxy(const CompositorProxy&); | 136 void writeCompositorProxy(const CompositorProxy&); |
137 void writeFile(const File&); | 137 void writeFile(const File&); |
138 void writeFileIndex(int blobIndex); | 138 void writeFileIndex(int blobIndex); |
139 void writeFileList(const FileList&); | 139 void writeFileList(const FileList&); |
140 void writeFileListIndex(const Vector<int>& blobIndices); | 140 void writeFileListIndex(const Vector<int>& blobIndices); |
141 void writeArrayBuffer(const DOMArrayBuffer&); | 141 void writeArrayBuffer(const DOMArrayBuffer&); |
142 void writeArrayBufferView(const DOMArrayBufferView&); | 142 void writeArrayBufferView(const DOMArrayBufferView&); |
143 void doWriteImageData(uint32_t width, uint32_t height, const uint8_t* pixelD
ata, uint32_t pixelDataLength); | 143 void doWriteImageData(uint32_t width, uint32_t height, const uint8_t* pixelD
ata, uint32_t pixelDataLength); |
144 void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelDat
a, uint32_t pixelDataLength); | 144 void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelDat
a, uint32_t pixelDataLength); |
145 void writeImageBitmap(uint32_t width, uint32_t height, uint32_t isOriginClea
n, const uint8_t* pixelData, uint32_t pixelDataLength); | 145 void writeImageBitmap(uint32_t width, uint32_t height, uint32_t isOriginClea
n, uint32_t isPremultiplied, const uint8_t* pixelData, uint32_t pixelDataLength)
; |
146 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags); | 146 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags); |
147 void writeTransferredMessagePort(uint32_t index); | 147 void writeTransferredMessagePort(uint32_t index); |
148 void writeTransferredArrayBuffer(uint32_t index); | 148 void writeTransferredArrayBuffer(uint32_t index); |
149 void writeTransferredImageBitmap(uint32_t index); | 149 void writeTransferredImageBitmap(uint32_t index); |
150 void writeTransferredOffscreenCanvas(uint32_t index, uint32_t width, uint32_
t height, uint32_t id); | 150 void writeTransferredOffscreenCanvas(uint32_t index, uint32_t width, uint32_
t height, uint32_t id); |
151 void writeTransferredSharedArrayBuffer(uint32_t index); | 151 void writeTransferredSharedArrayBuffer(uint32_t index); |
152 void writeObjectReference(uint32_t reference); | 152 void writeObjectReference(uint32_t reference); |
153 void writeObject(uint32_t numProperties); | 153 void writeObject(uint32_t numProperties); |
154 void writeSparseArray(uint32_t numProperties, uint32_t length); | 154 void writeSparseArray(uint32_t numProperties, uint32_t length); |
155 void writeDenseArray(uint32_t numProperties, uint32_t length); | 155 void writeDenseArray(uint32_t numProperties, uint32_t length); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 private: | 502 private: |
503 void undoReadTag(); | 503 void undoReadTag(); |
504 bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*); | 504 bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*); |
505 bool readString(v8::Local<v8::Value>*); | 505 bool readString(v8::Local<v8::Value>*); |
506 bool readUCharString(v8::Local<v8::Value>*); | 506 bool readUCharString(v8::Local<v8::Value>*); |
507 bool readStringObject(v8::Local<v8::Value>*); | 507 bool readStringObject(v8::Local<v8::Value>*); |
508 bool readInt32(v8::Local<v8::Value>*); | 508 bool readInt32(v8::Local<v8::Value>*); |
509 bool readDate(v8::Local<v8::Value>*); | 509 bool readDate(v8::Local<v8::Value>*); |
510 bool readNumber(v8::Local<v8::Value>*); | 510 bool readNumber(v8::Local<v8::Value>*); |
511 bool readNumberObject(v8::Local<v8::Value>*); | 511 bool readNumberObject(v8::Local<v8::Value>*); |
512 ImageData* doReadImageData(); | 512 bool doReadImageDataProperties(uint32_t* width, uint32_t* height, uint32_t*
pixelDataLength); |
513 bool readImageData(v8::Local<v8::Value>*); | 513 bool readImageData(v8::Local<v8::Value>*); |
514 bool readImageBitmap(v8::Local<v8::Value>*); | 514 bool readImageBitmap(v8::Local<v8::Value>*); |
515 bool readCompositorProxy(v8::Local<v8::Value>*); | 515 bool readCompositorProxy(v8::Local<v8::Value>*); |
516 DOMArrayBuffer* doReadArrayBuffer(); | 516 DOMArrayBuffer* doReadArrayBuffer(); |
517 bool readArrayBuffer(v8::Local<v8::Value>*); | 517 bool readArrayBuffer(v8::Local<v8::Value>*); |
518 bool readArrayBufferView(v8::Local<v8::Value>*, ScriptValueDeserializer&); | 518 bool readArrayBufferView(v8::Local<v8::Value>*, ScriptValueDeserializer&); |
519 bool readRegExp(v8::Local<v8::Value>*); | 519 bool readRegExp(v8::Local<v8::Value>*); |
520 bool readBlob(v8::Local<v8::Value>*, bool isIndexed); | 520 bool readBlob(v8::Local<v8::Value>*, bool isIndexed); |
521 bool readFile(v8::Local<v8::Value>*, bool isIndexed); | 521 bool readFile(v8::Local<v8::Value>*, bool isIndexed); |
522 bool readFileList(v8::Local<v8::Value>*, bool isIndexed); | 522 bool readFileList(v8::Local<v8::Value>*, bool isIndexed); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 ArrayBufferContentsArray* m_arrayBufferContents; | 615 ArrayBufferContentsArray* m_arrayBufferContents; |
616 ImageBitmapContentsArray* m_imageBitmapContents; | 616 ImageBitmapContentsArray* m_imageBitmapContents; |
617 Vector<v8::Local<v8::Value>> m_arrayBuffers; | 617 Vector<v8::Local<v8::Value>> m_arrayBuffers; |
618 Vector<v8::Local<v8::Value>> m_imageBitmaps; | 618 Vector<v8::Local<v8::Value>> m_imageBitmaps; |
619 uint32_t m_version; | 619 uint32_t m_version; |
620 }; | 620 }; |
621 | 621 |
622 } // namespace blink | 622 } // namespace blink |
623 | 623 |
624 #endif // ScriptValueSerializer_h | 624 #endif // ScriptValueSerializer_h |
OLD | NEW |