| 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 "bindings/core/v8/CallbackPromiseAdapter.h" | 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| 11 #include "core/dom/ExceptionCode.h" | |
| 12 #include "modules/bluetooth/BluetoothError.h" | 11 #include "modules/bluetooth/BluetoothError.h" |
| 13 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h" | 12 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h" |
| 14 #include "modules/bluetooth/BluetoothSupplement.h" | 13 #include "modules/bluetooth/BluetoothSupplement.h" |
| 15 #include "modules/bluetooth/BluetoothUUID.h" | 14 #include "modules/bluetooth/BluetoothUUID.h" |
| 16 #include "public/platform/modules/bluetooth/WebBluetooth.h" | 15 #include "public/platform/modules/bluetooth/WebBluetooth.h" |
| 17 | 16 |
| 18 namespace blink { | 17 namespace blink { |
| 19 | 18 |
| 20 BluetoothRemoteGATTService::BluetoothRemoteGATTService(PassOwnPtr<WebBluetoothRe
moteGATTService> webService) | 19 BluetoothRemoteGATTService::BluetoothRemoteGATTService(PassOwnPtr<WebBluetoothRe
moteGATTService> webService) |
| 21 : m_webService(webService) | 20 : m_webService(webService) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; | 81 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; |
| 83 ScriptPromise promise = resolver->promise(); | 82 ScriptPromise promise = resolver->promise(); |
| 84 | 83 |
| 85 WebBluetooth* webbluetooth = BluetoothSupplement::fromScriptState(scriptStat
e); | 84 WebBluetooth* webbluetooth = BluetoothSupplement::fromScriptState(scriptStat
e); |
| 86 webbluetooth->getCharacteristics(m_webService->serviceInstanceID, characteri
sticsUUID, new CallbackPromiseAdapter<RemoteCharacteristicArray, BluetoothError>
(resolver)); | 85 webbluetooth->getCharacteristics(m_webService->serviceInstanceID, characteri
sticsUUID, new CallbackPromiseAdapter<RemoteCharacteristicArray, BluetoothError>
(resolver)); |
| 87 | 86 |
| 88 return promise; | 87 return promise; |
| 89 } | 88 } |
| 90 | 89 |
| 91 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |