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

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

Issue 2857143005: Gather serialization-related code into a directory. (Closed)
Patch Set: Created 3 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
(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 "platform/wtf/Noncopyable.h"
11
12 namespace blink {
13
14 class DOMArrayBufferBase;
15 class ImageBitmap;
16 class OffscreenCanvas;
17 class MessagePort;
18
19 using ArrayBufferArray = HeapVector<Member<DOMArrayBufferBase>>;
20 using ImageBitmapArray = HeapVector<Member<ImageBitmap>>;
21 using OffscreenCanvasArray = HeapVector<Member<OffscreenCanvas>>;
22 using MessagePortArray = HeapVector<Member<MessagePort>>;
23
24 class CORE_EXPORT Transferables final {
25 STACK_ALLOCATED();
26 WTF_MAKE_NONCOPYABLE(Transferables);
27
28 public:
29 Transferables() {}
30
31 ArrayBufferArray array_buffers;
32 ImageBitmapArray image_bitmaps;
33 OffscreenCanvasArray offscreen_canvases;
34 MessagePortArray message_ports;
35 };
36
37 // Along with extending |Transferables| to hold a new kind of transferable
38 // objects, serialization handling code changes are required:
39 // - extend ScriptValueSerializer::copyTransferables()
40 // - alter SerializedScriptValue(Factory) to do the actual transfer.
41
42 } // namespace blink
43
44 #endif // Transferables_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698