| 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 "core/page/PageLifecycleObserver.h" | 10 #include "core/page/PageLifecycleObserver.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // PageLifecycleObserver interface. | 70 // PageLifecycleObserver interface. |
| 71 void pageVisibilityChanged() override; | 71 void pageVisibilityChanged() override; |
| 72 | 72 |
| 73 // If gatt is connected then disconnects and sets gatt.connected to false. | 73 // If gatt is connected then disconnects and sets gatt.connected to false. |
| 74 // Returns true if gatt was disconnected. | 74 // Returns true if gatt was disconnected. |
| 75 bool disconnectGATTIfConnected(); | 75 bool disconnectGATTIfConnected(); |
| 76 | 76 |
| 77 // EventTarget methods: | 77 // EventTarget methods: |
| 78 const AtomicString& interfaceName() const override; | 78 const AtomicString& interfaceName() const override; |
| 79 ExecutionContext* executionContext() const override; | 79 ExecutionContext* getExecutionContext() const override; |
| 80 | 80 |
| 81 // Interface required by Garbage Collection: | 81 // Interface required by Garbage Collection: |
| 82 DECLARE_VIRTUAL_TRACE(); | 82 DECLARE_VIRTUAL_TRACE(); |
| 83 | 83 |
| 84 // IDL exposed interface: | 84 // IDL exposed interface: |
| 85 String id() { return m_webDevice->id; } | 85 String id() { return m_webDevice->id; } |
| 86 String name() { return m_webDevice->name; } | 86 String name() { return m_webDevice->name; } |
| 87 BluetoothAdvertisingData* adData() { return m_adData; } | 87 BluetoothAdvertisingData* adData() { return m_adData; } |
| 88 unsigned deviceClass(bool& isNull); | 88 unsigned deviceClass(bool& isNull); |
| 89 String vendorIDSource(); | 89 String vendorIDSource(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 OwnPtr<WebBluetoothDevice> m_webDevice; | 102 OwnPtr<WebBluetoothDevice> m_webDevice; |
| 103 Member<BluetoothAdvertisingData> m_adData; | 103 Member<BluetoothAdvertisingData> m_adData; |
| 104 Member<BluetoothRemoteGATTServer> m_gatt; | 104 Member<BluetoothRemoteGATTServer> m_gatt; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace blink | 107 } // namespace blink |
| 108 | 108 |
| 109 #endif // BluetoothDevice_h | 109 #endif // BluetoothDevice_h |
| OLD | NEW |