Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/Transferables.h |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/Transferables.h b/third_party/WebKit/Source/bindings/core/v8/Transferables.h |
| index bec7fc0cf134378dd5717888d778f112999fa09a..b8b4347743d6e90f88d20d62eb296e384fb9d85a 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/Transferables.h |
| +++ b/third_party/WebKit/Source/bindings/core/v8/Transferables.h |
| @@ -19,17 +19,23 @@ using ArrayBufferArray = HeapVector<Member<DOMArrayBufferBase>>; |
| using ImageBitmapArray = HeapVector<Member<ImageBitmap>>; |
| using MessagePortArray = HeapVector<Member<MessagePort>>; |
| -class CORE_EXPORT Transferables final { |
| - STACK_ALLOCATED(); |
| +class CORE_EXPORT Transferables : public GarbageCollectedFinalized<Transferables> { |
| WTF_MAKE_NONCOPYABLE(Transferables); |
| public: |
| - Transferables() |
| - { |
| - } |
| + static Transferables* create() { return s_registeredFactory(); } |
| + Transferables() { } |
| + virtual ~Transferables() { } |
| ArrayBufferArray arrayBuffers; |
| ImageBitmapArray imageBitmaps; |
| MessagePortArray messagePorts; |
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| + using Factory = Transferables*(*)(); |
| + static void registerFactory(Factory f) { s_registeredFactory = f; } |
|
haraken
2016/04/21 00:29:02
f => factory
|
| + |
| +private: |
| + static Factory s_registeredFactory; |
| }; |
| // Along with extending |Transferables| to hold a new kind of transferable |