OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/BluetoothDevice.h" | 5 #include "modules/bluetooth/BluetoothDevice.h" |
6 | 6 |
| 7 #include <memory> |
| 8 #include <utility> |
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 9 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
8 #include "bindings/core/v8/ScriptPromise.h" | 10 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 11 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "core/dom/DOMException.h" | 12 #include "core/dom/DOMException.h" |
11 #include "core/events/Event.h" | 13 #include "core/events/Event.h" |
12 #include "modules/bluetooth/Bluetooth.h" | 14 #include "modules/bluetooth/Bluetooth.h" |
13 #include "modules/bluetooth/BluetoothAttributeInstanceMap.h" | 15 #include "modules/bluetooth/BluetoothAttributeInstanceMap.h" |
14 #include "modules/bluetooth/BluetoothError.h" | 16 #include "modules/bluetooth/BluetoothError.h" |
15 #include "modules/bluetooth/BluetoothRemoteGATTServer.h" | 17 #include "modules/bluetooth/BluetoothRemoteGATTServer.h" |
16 #include <memory> | |
17 #include <utility> | |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 BluetoothDevice::BluetoothDevice(ExecutionContext* context, | 21 BluetoothDevice::BluetoothDevice(ExecutionContext* context, |
22 mojom::blink::WebBluetoothDevicePtr device, | 22 mojom::blink::WebBluetoothDevicePtr device, |
23 Bluetooth* bluetooth) | 23 Bluetooth* bluetooth) |
24 : ContextLifecycleObserver(context), | 24 : ContextLifecycleObserver(context), |
25 m_attributeInstanceMap(new BluetoothAttributeInstanceMap(this)), | 25 m_attributeInstanceMap(new BluetoothAttributeInstanceMap(this)), |
26 m_device(std::move(device)), | 26 m_device(std::move(device)), |
27 m_gatt(BluetoothRemoteGATTServer::create(this)), | 27 m_gatt(BluetoothRemoteGATTServer::create(this)), |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 DEFINE_TRACE(BluetoothDevice) { | 119 DEFINE_TRACE(BluetoothDevice) { |
120 visitor->trace(m_attributeInstanceMap); | 120 visitor->trace(m_attributeInstanceMap); |
121 visitor->trace(m_gatt); | 121 visitor->trace(m_gatt); |
122 visitor->trace(m_bluetooth); | 122 visitor->trace(m_bluetooth); |
123 EventTargetWithInlineData::trace(visitor); | 123 EventTargetWithInlineData::trace(visitor); |
124 ContextLifecycleObserver::trace(visitor); | 124 ContextLifecycleObserver::trace(visitor); |
125 } | 125 } |
126 | 126 |
127 } // namespace blink | 127 } // namespace blink |
OLD | NEW |