Chromium Code Reviews| Index: Source/modules/bluetooth/BluetoothArrayBuffer.h |
| diff --git a/Source/modules/bluetooth/BluetoothArrayBuffer.h b/Source/modules/bluetooth/BluetoothArrayBuffer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1605c67b0101d50ae76f3c33d7015a8911dcc5e9 |
| --- /dev/null |
| +++ b/Source/modules/bluetooth/BluetoothArrayBuffer.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 BluetoothArrayBuffer_h |
| +#define BluetoothArrayBuffer_h |
| + |
| +#include "core/dom/DOMArrayBuffer.h" |
| +#include "platform/heap/Handle.h" |
| +#include "public/platform/WebVector.h" |
| + |
| +namespace blink { |
| + |
| +class ScriptPromiseResolver; |
| + |
| +// BluetoothArrayBuffer is used with CallbackPromiseAdapter to receive |
| +// WebVector responses. See CallbackPromiseAdapter class comments. |
| +class BluetoothArrayBuffer { |
|
Jeffrey Yasskin
2015/06/10 21:12:25
Can you name this "ConvertWebVectorToArrayBuffer"?
ortuno
2015/06/11 00:10:52
Hmm but converting from WebVector to ArrayBuffer i
Jeffrey Yasskin
2015/06/11 00:31:37
If it only needed to provide the interface for Cal
ortuno
2015/06/11 02:56:33
Ah ok. That makes sense.
|
| + WTF_MAKE_NONCOPYABLE(BluetoothArrayBuffer); |
| +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: |
| + BluetoothArrayBuffer() = delete; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // BluetoothArrayBuffer_h |