| 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 #ifndef BluetoothDevice_h | 5 #ifndef BluetoothDevice_h |
| 6 #define BluetoothDevice_h | 6 #define BluetoothDevice_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/dom/ContextLifecycleObserver.h" | 9 #include "core/dom/ContextLifecycleObserver.h" |
| 10 #include "modules/EventTargetModules.h" | 10 #include "modules/EventTargetModules.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // Interface required by CallbackPromiseAdapter: | 44 // Interface required by CallbackPromiseAdapter: |
| 45 static BluetoothDevice* take(ScriptPromiseResolver*, | 45 static BluetoothDevice* take(ScriptPromiseResolver*, |
| 46 const String& id, | 46 const String& id, |
| 47 const String& name, | 47 const String& name, |
| 48 Bluetooth*); | 48 Bluetooth*); |
| 49 | 49 |
| 50 static mojom::blink::WebBluetoothDeviceIdPtr createMojoDeviceId( | 50 static mojom::blink::WebBluetoothDeviceIdPtr createMojoDeviceId( |
| 51 const String& deviceId); | 51 const String& deviceId); |
| 52 | 52 |
| 53 BluetoothRemoteGATTService* getOrCreateBluetoothRemoteGATTService( | 53 BluetoothRemoteGATTService* getOrCreateRemoteGATTService( |
| 54 const String& serviceInstanceId, | 54 const String& serviceInstanceId, |
| 55 const String& uuid, | 55 const String& uuid, |
| 56 bool isPrimary, | 56 bool isPrimary, |
| 57 const String& deviceInstanceId); | 57 const String& deviceInstanceId); |
| 58 bool isValidService(const String& serviceInstanceId); | 58 bool isValidService(const String& serviceInstanceId); |
| 59 | 59 |
| 60 BluetoothRemoteGATTCharacteristic* | 60 BluetoothRemoteGATTCharacteristic* getOrCreateRemoteGATTCharacteristic( |
| 61 getOrCreateBluetoothRemoteGATTCharacteristic( | |
| 62 ExecutionContext*, | 61 ExecutionContext*, |
| 63 const String& characteristicInstanceId, | 62 const String& characteristicInstanceId, |
| 64 const String& serviceInstanceId, | 63 const String& serviceInstanceId, |
| 65 const String& uuid, | 64 const String& uuid, |
| 66 uint32_t characteristicProperties, | 65 uint32_t characteristicProperties, |
| 67 BluetoothRemoteGATTService*); | 66 BluetoothRemoteGATTService*); |
| 68 bool isValidCharacteristic(const String& characteristicInstanceId); | 67 bool isValidCharacteristic(const String& characteristicInstanceId); |
| 69 | 68 |
| 70 // We should disconnect from the device in all of the following cases: | 69 // We should disconnect from the device in all of the following cases: |
| 71 // 1. When the object gets GarbageCollected e.g. it went out of scope. | 70 // 1. When the object gets GarbageCollected e.g. it went out of scope. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 116 |
| 118 const String m_id; | 117 const String m_id; |
| 119 const String m_name; | 118 const String m_name; |
| 120 Member<BluetoothRemoteGATTServer> m_gatt; | 119 Member<BluetoothRemoteGATTServer> m_gatt; |
| 121 Member<Bluetooth> m_bluetooth; | 120 Member<Bluetooth> m_bluetooth; |
| 122 }; | 121 }; |
| 123 | 122 |
| 124 } // namespace blink | 123 } // namespace blink |
| 125 | 124 |
| 126 #endif // BluetoothDevice_h | 125 #endif // BluetoothDevice_h |
| OLD | NEW |