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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h

Issue 2637343002: Implement WebBluetooth descriptor.readValue() (Closed)
Patch Set: run bad_message_reasons Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BluetoothRemoteGATTDescriptor_h 5 #ifndef BluetoothRemoteGATTDescriptor_h
6 #define BluetoothRemoteGATTDescriptor_h 6 #define BluetoothRemoteGATTDescriptor_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/DOMArrayPiece.h" 9 #include "core/dom/DOMArrayPiece.h"
10 #include "core/dom/DOMDataView.h" 10 #include "core/dom/DOMDataView.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ScriptPromise writeValue(ScriptState*, const DOMArrayPiece&); 48 ScriptPromise writeValue(ScriptState*, const DOMArrayPiece&);
49 49
50 // Interface required by garbage collection. 50 // Interface required by garbage collection.
51 DECLARE_VIRTUAL_TRACE(); 51 DECLARE_VIRTUAL_TRACE();
52 52
53 private: 53 private:
54 friend class DescriptorReadValueCallback; 54 friend class DescriptorReadValueCallback;
55 55
56 BluetoothRemoteGATTServer* getGatt() { return m_characteristic->getGatt(); } 56 BluetoothRemoteGATTServer* getGatt() { return m_characteristic->getGatt(); }
57 57
58 void ReadValueCallback(ScriptPromiseResolver*,
59 mojom::blink::WebBluetoothResult,
60 const Optional<Vector<uint8_t>>&);
61
58 mojom::blink::WebBluetoothRemoteGATTDescriptorPtr m_descriptor; 62 mojom::blink::WebBluetoothRemoteGATTDescriptorPtr m_descriptor;
59 Member<BluetoothRemoteGATTCharacteristic> m_characteristic; 63 Member<BluetoothRemoteGATTCharacteristic> m_characteristic;
60 Member<DOMDataView> m_value; 64 Member<DOMDataView> m_value;
61 }; 65 };
62 66
63 } // namespace blink 67 } // namespace blink
64 68
65 #endif // BluetoothRemoteGATTDescriptor_h 69 #endif // BluetoothRemoteGATTDescriptor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698