| 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 <memory> | 8 #include <memory> |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "core/dom/ContextLifecycleObserver.h" | 10 #include "core/dom/ContextLifecycleObserver.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Interface required by Garbage Collection: | 84 // Interface required by Garbage Collection: |
| 85 DECLARE_VIRTUAL_TRACE(); | 85 DECLARE_VIRTUAL_TRACE(); |
| 86 | 86 |
| 87 // IDL exposed interface: | 87 // IDL exposed interface: |
| 88 String id() { return device_->id; } | 88 String id() { return device_->id; } |
| 89 String name() { return device_->name; } | 89 String name() { return device_->name; } |
| 90 BluetoothRemoteGATTServer* gatt() { return gatt_; } | 90 BluetoothRemoteGATTServer* gatt() { return gatt_; } |
| 91 | 91 |
| 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(gattserverdisconnected); | 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(gattserverdisconnected); |
| 93 | 93 |
| 94 protected: |
| 95 // EventTarget overrides: |
| 96 void AddedEventListener(const AtomicString& eventType, |
| 97 RegisteredEventListener&) override; |
| 98 |
| 94 private: | 99 private: |
| 95 // Holds all GATT Attributes associated with this BluetoothDevice. | 100 // Holds all GATT Attributes associated with this BluetoothDevice. |
| 96 Member<BluetoothAttributeInstanceMap> attribute_instance_map_; | 101 Member<BluetoothAttributeInstanceMap> attribute_instance_map_; |
| 97 | 102 |
| 98 mojom::blink::WebBluetoothDevicePtr device_; | 103 mojom::blink::WebBluetoothDevicePtr device_; |
| 99 Member<BluetoothRemoteGATTServer> gatt_; | 104 Member<BluetoothRemoteGATTServer> gatt_; |
| 100 Member<Bluetooth> bluetooth_; | 105 Member<Bluetooth> bluetooth_; |
| 101 }; | 106 }; |
| 102 | 107 |
| 103 } // namespace blink | 108 } // namespace blink |
| 104 | 109 |
| 105 #endif // BluetoothDevice_h | 110 #endif // BluetoothDevice_h |
| OLD | NEW |