OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 BluetoothGATTRemoteServer_h | 5 #ifndef BluetoothGATTRemoteServer_h |
6 #define BluetoothGATTRemoteServer_h | 6 #define BluetoothGATTRemoteServer_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "bindings/modules/v8/UnionTypesModules.h" | 9 #include "bindings/modules/v8/UnionTypesModules.h" |
10 #include "platform/heap/Heap.h" | 10 #include "platform/heap/Heap.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // Interface required by CallbackPromiseAdapter: | 35 // Interface required by CallbackPromiseAdapter: |
36 using WebType = OwnPtr<WebBluetoothGATTRemoteServer>; | 36 using WebType = OwnPtr<WebBluetoothGATTRemoteServer>; |
37 static BluetoothGATTRemoteServer* take(ScriptPromiseResolver*, PassOwnPtr<We
bBluetoothGATTRemoteServer>); | 37 static BluetoothGATTRemoteServer* take(ScriptPromiseResolver*, PassOwnPtr<We
bBluetoothGATTRemoteServer>); |
38 | 38 |
39 // Interface required by Garbage Collectoin: | 39 // Interface required by Garbage Collectoin: |
40 DEFINE_INLINE_TRACE() { } | 40 DEFINE_INLINE_TRACE() { } |
41 | 41 |
42 // IDL exposed interface: | 42 // IDL exposed interface: |
43 bool connected() { return m_webGATT->connected; } | 43 bool connected() { return m_webGATT->connected; } |
| 44 void disconnect(ScriptState*); |
44 ScriptPromise getPrimaryService(ScriptState*, const StringOrUnsignedLong& se
rvice, ExceptionState&); | 45 ScriptPromise getPrimaryService(ScriptState*, const StringOrUnsignedLong& se
rvice, ExceptionState&); |
45 | 46 |
46 private: | 47 private: |
47 OwnPtr<WebBluetoothGATTRemoteServer> m_webGATT; | 48 OwnPtr<WebBluetoothGATTRemoteServer> m_webGATT; |
48 }; | 49 }; |
49 | 50 |
50 } // namespace blink | 51 } // namespace blink |
51 | 52 |
52 #endif // BluetoothDevice_h | 53 #endif // BluetoothDevice_h |
OLD | NEW |