| Index: Source/modules/bluetooth/ConvertWebVectorToArrayBuffer.h
|
| diff --git a/Source/modules/bluetooth/ConvertWebVectorToArrayBuffer.h b/Source/modules/bluetooth/ConvertWebVectorToArrayBuffer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..231fcb89cd23b8d0c058209f153255f82931deea
|
| --- /dev/null
|
| +++ b/Source/modules/bluetooth/ConvertWebVectorToArrayBuffer.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2015 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 ConvertWebVectorToArrayBuffer_h
|
| +#define ConvertWebVectorToArrayBuffer_h
|
| +
|
| +#include "core/dom/DOMArrayBuffer.h"
|
| +#include "platform/heap/Handle.h"
|
| +#include "public/platform/WebVector.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class ScriptPromiseResolver;
|
| +
|
| +// ConvertWebVectorToArrayBuffer is used with CallbackPromiseAdapter to receive
|
| +// WebVector responses. See CallbackPromiseAdapter class comments.
|
| +class ConvertWebVectorToArrayBuffer {
|
| + WTF_MAKE_NONCOPYABLE(ConvertWebVectorToArrayBuffer);
|
| +public:
|
| + // Interface required by CallbackPromiseAdapter:
|
| + typedef WebVector<uint8_t> WebType;
|
| + static PassRefPtr<DOMArrayBuffer> take(ScriptPromiseResolver*, WebVector<uint8_t>*);
|
| + static void dispose(WebVector<uint8_t>*);
|
| +
|
| +private:
|
| + ConvertWebVectorToArrayBuffer() = delete;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // ConvertWebVectorToArrayBuffer_h
|
|
|