Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/Transferables.h

Issue 1917733004: Reland of: Make OffscreenCanvas Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address all comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 Transferables_h 5 #ifndef Transferables_h
6 #define Transferables_h 6 #define Transferables_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/Noncopyable.h" 10 #include "wtf/Noncopyable.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class DOMArrayBufferBase; 14 class DOMArrayBufferBase;
15 class ImageBitmap; 15 class ImageBitmap;
16 class OffscreenCanvas;
16 class MessagePort; 17 class MessagePort;
17 18
18 using ArrayBufferArray = HeapVector<Member<DOMArrayBufferBase>>; 19 using ArrayBufferArray = HeapVector<Member<DOMArrayBufferBase>>;
19 using ImageBitmapArray = HeapVector<Member<ImageBitmap>>; 20 using ImageBitmapArray = HeapVector<Member<ImageBitmap>>;
21 using OffscreenCanvasArray = HeapVector<Member<OffscreenCanvas>>;
20 using MessagePortArray = HeapVector<Member<MessagePort>>; 22 using MessagePortArray = HeapVector<Member<MessagePort>>;
21 23
22 class CORE_EXPORT Transferables final { 24 class CORE_EXPORT Transferables final {
23 STACK_ALLOCATED(); 25 STACK_ALLOCATED();
24 WTF_MAKE_NONCOPYABLE(Transferables); 26 WTF_MAKE_NONCOPYABLE(Transferables);
25 public: 27 public:
26 Transferables() 28 Transferables()
27 { 29 {
28 } 30 }
29 31
30 ArrayBufferArray arrayBuffers; 32 ArrayBufferArray arrayBuffers;
31 ImageBitmapArray imageBitmaps; 33 ImageBitmapArray imageBitmaps;
34 OffscreenCanvasArray offscreenCanvases;
32 MessagePortArray messagePorts; 35 MessagePortArray messagePorts;
33 }; 36 };
34 37
35 // Along with extending |Transferables| to hold a new kind of transferable 38 // Along with extending |Transferables| to hold a new kind of transferable
36 // objects, serialization handling code changes are required: 39 // objects, serialization handling code changes are required:
37 // - extend ScriptValueSerializer::copyTransferables() 40 // - extend ScriptValueSerializer::copyTransferables()
38 // - alter SerializedScriptValue(Factory) to do the actual transfer. 41 // - alter SerializedScriptValue(Factory) to do the actual transfer.
39 42
40 } // namespace blink 43 } // namespace blink
41 44
42 #endif // Transferables_h 45 #endif // Transferables_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698