OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef Transferables_h |
| 6 #define Transferables_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Noncopyable.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class DOMArrayBufferBase; |
| 15 class ImageBitmap; |
| 16 class MessagePort; |
| 17 |
| 18 using ArrayBufferArray = HeapVector<Member<DOMArrayBufferBase>>; |
| 19 using ImageBitmapArray = HeapVector<Member<ImageBitmap>>; |
| 20 using MessagePortArray = HeapVector<Member<MessagePort>>; |
| 21 |
| 22 class CORE_EXPORT Transferables final { |
| 23 STACK_ALLOCATED(); |
| 24 WTF_MAKE_NONCOPYABLE(Transferables); |
| 25 public: |
| 26 Transferables(); |
| 27 ~Transferables(); |
| 28 |
| 29 ArrayBufferArray arrayBuffers; |
| 30 ImageBitmapArray imageBitmaps; |
| 31 MessagePortArray messagePorts; |
| 32 }; |
| 33 |
| 34 // Along with extending |Transferables| to hold a new kind of transferable |
| 35 // objects, serialization handling code changes are required: |
| 36 // - extend ScriptValueSerializer::copyTransferables() |
| 37 // - alter SerializedScriptValue(Factory) to do the actual transfer. |
| 38 |
| 39 } // namespace blink |
| 40 |
| 41 #endif // Transferables_h |
OLD | NEW |