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 #include "modules/bluetooth/BluetoothRemoteGATTService.h" | 5 #include "modules/bluetooth/BluetoothRemoteGATTService.h" |
6 | 6 |
| 7 #include <utility> |
7 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
9 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
10 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
11 #include "core/inspector/ConsoleMessage.h" | 12 #include "core/inspector/ConsoleMessage.h" |
12 #include "modules/bluetooth/Bluetooth.h" | 13 #include "modules/bluetooth/Bluetooth.h" |
13 #include "modules/bluetooth/BluetoothError.h" | 14 #include "modules/bluetooth/BluetoothError.h" |
14 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h" | 15 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h" |
15 #include "modules/bluetooth/BluetoothUUID.h" | 16 #include "modules/bluetooth/BluetoothUUID.h" |
16 #include "wtf/PtrUtil.h" | 17 #include "wtf/PtrUtil.h" |
17 #include <utility> | |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char kGATTServerDisconnected[] = | 23 const char kGATTServerDisconnected[] = |
24 "GATT Server disconnected while retrieving characteristics."; | 24 "GATT Server disconnected while retrieving characteristics."; |
25 const char kGATTServerNotConnected[] = | 25 const char kGATTServerNotConnected[] = |
26 "GATT Server is disconnected. Cannot retrieve characteristics."; | 26 "GATT Server is disconnected. Cannot retrieve characteristics."; |
27 const char kInvalidService[] = | 27 const char kInvalidService[] = |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 m_service->instance_id, quantity, characteristicsUUID, | 148 m_service->instance_id, quantity, characteristicsUUID, |
149 convertToBaseCallback( | 149 convertToBaseCallback( |
150 WTF::bind(&BluetoothRemoteGATTService::GetCharacteristicsCallback, | 150 WTF::bind(&BluetoothRemoteGATTService::GetCharacteristicsCallback, |
151 wrapPersistent(this), m_service->instance_id, quantity, | 151 wrapPersistent(this), m_service->instance_id, quantity, |
152 wrapPersistent(resolver)))); | 152 wrapPersistent(resolver)))); |
153 | 153 |
154 return promise; | 154 return promise; |
155 } | 155 } |
156 | 156 |
157 } // namespace blink | 157 } // namespace blink |
OLD | NEW |