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

Unified Diff: Source/modules/bluetooth/ConvertWebVectorToArrayBuffer.h

Issue 1147243004: bluetooth: readValue Blink implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-read-value-interface
Patch Set: Fix Web Exposed Layout Test Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « Source/modules/bluetooth/BluetoothGATTCharacteristic.idl ('k') | Source/modules/bluetooth/ConvertWebVectorToArrayBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698