| 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/ActiveDOMObject.h" | 9 #include "core/dom/ActiveDOMObject.h" |
| 10 #include "modules/EventTargetModules.h" | 10 #include "modules/EventTargetModules.h" |
| 11 #include "modules/bluetooth/BluetoothAdvertisingData.h" | |
| 12 #include "modules/bluetooth/BluetoothRemoteGATTServer.h" | 11 #include "modules/bluetooth/BluetoothRemoteGATTServer.h" |
| 13 #include "platform/heap/Heap.h" | 12 #include "platform/heap/Heap.h" |
| 14 #include "public/platform/modules/bluetooth/WebBluetoothDevice.h" | 13 #include "public/platform/modules/bluetooth/WebBluetoothDevice.h" |
| 15 #include "wtf/OwnPtr.h" | 14 #include "wtf/OwnPtr.h" |
| 16 #include "wtf/PassOwnPtr.h" | 15 #include "wtf/PassOwnPtr.h" |
| 17 #include "wtf/text/WTFString.h" | 16 #include "wtf/text/WTFString.h" |
| 18 | 17 |
| 19 namespace blink { | 18 namespace blink { |
| 20 | 19 |
| 21 class BluetoothRemoteGATTServer; | 20 class BluetoothRemoteGATTServer; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // EventTarget methods: | 64 // EventTarget methods: |
| 66 const AtomicString& interfaceName() const override; | 65 const AtomicString& interfaceName() const override; |
| 67 ExecutionContext* getExecutionContext() const override; | 66 ExecutionContext* getExecutionContext() const override; |
| 68 | 67 |
| 69 // Interface required by Garbage Collection: | 68 // Interface required by Garbage Collection: |
| 70 DECLARE_VIRTUAL_TRACE(); | 69 DECLARE_VIRTUAL_TRACE(); |
| 71 | 70 |
| 72 // IDL exposed interface: | 71 // IDL exposed interface: |
| 73 String id() { return m_webDevice->id; } | 72 String id() { return m_webDevice->id; } |
| 74 String name() { return m_webDevice->name; } | 73 String name() { return m_webDevice->name; } |
| 75 BluetoothAdvertisingData* adData() { return m_adData; } | |
| 76 BluetoothRemoteGATTServer* gatt() { return m_gatt; } | 74 BluetoothRemoteGATTServer* gatt() { return m_gatt; } |
| 77 Vector<String> uuids(); | 75 Vector<String> uuids(); |
| 78 // TODO(ortuno): Remove connectGATT | 76 // TODO(ortuno): Remove connectGATT |
| 79 // http://crbug.com/582292 | 77 // http://crbug.com/582292 |
| 80 ScriptPromise connectGATT(ScriptState*); | 78 ScriptPromise connectGATT(ScriptState*); |
| 81 | 79 |
| 82 DEFINE_ATTRIBUTE_EVENT_LISTENER(gattserverdisconnected); | 80 DEFINE_ATTRIBUTE_EVENT_LISTENER(gattserverdisconnected); |
| 83 | 81 |
| 84 private: | 82 private: |
| 85 OwnPtr<WebBluetoothDevice> m_webDevice; | 83 OwnPtr<WebBluetoothDevice> m_webDevice; |
| 86 Member<BluetoothAdvertisingData> m_adData; | |
| 87 Member<BluetoothRemoteGATTServer> m_gatt; | 84 Member<BluetoothRemoteGATTServer> m_gatt; |
| 88 }; | 85 }; |
| 89 | 86 |
| 90 } // namespace blink | 87 } // namespace blink |
| 91 | 88 |
| 92 #endif // BluetoothDevice_h | 89 #endif // BluetoothDevice_h |
| OLD | NEW |