Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/TransferableExtractor.h |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/TransferableExtractor.h b/third_party/WebKit/Source/bindings/core/v8/TransferableExtractor.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6438e300268d46b3cb5858369f651e9a405781fc |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/bindings/core/v8/TransferableExtractor.h |
| @@ -0,0 +1,26 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef TransferableExtractor_h |
| +#define TransferableExtractor_h |
| + |
| +#include "bindings/core/v8/ExceptionState.h" |
| +#include "bindings/core/v8/SerializedScriptValue.h" |
| +#include "core/CoreExport.h" |
| +#include "wtf/PassOwnPtr.h" |
| +#include <v8.h> |
| + |
| +namespace blink { |
| + |
| +class CORE_EXPORT TransferableExtractor { |
|
haraken
2016/04/19 00:48:10
Do you have a plan to add more extractors? It look
xidachen
2016/04/19 15:29:50
The reason to have this class here is that we cann
haraken
2016/04/20 01:18:24
If you don't have a concrete plan now, I'd prefer
|
| +public: |
| + virtual ~TransferableExtractor() { } |
| + static void registerTransferableExtractor(PassOwnPtr<TransferableExtractor>); |
| + static const Vector<OwnPtr<TransferableExtractor>>& getExtractors(); |
| + virtual bool extract(v8::Local<v8::Value>, v8::Isolate*, Transferables&, ExceptionState&, const unsigned) = 0; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // TransferableExtractor_h |