| 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 Bluetooth_h | 5 #ifndef Bluetooth_h |
| 6 #define Bluetooth_h | 6 #define Bluetooth_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/bluetooth/BluetoothDiscovery.h" | 10 #include "modules/bluetooth/BluetoothDiscovery.h" |
| 11 #include "platform/heap/Handle.h" |
| 10 | 12 |
| 11 namespace blink { | 13 namespace blink { |
| 12 | 14 |
| 13 class Bluetooth final | 15 class ScriptPromise; |
| 14 : public BluetoothDiscovery { | 16 class ScriptState; |
| 17 |
| 18 class Bluetooth |
| 19 : public GarbageCollected<Bluetooth> |
| 20 , public ScriptWrappable { |
| 15 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 16 public: | 22 public: |
| 17 static Bluetooth* create() | 23 static Bluetooth* create() |
| 18 { | 24 { |
| 19 return new Bluetooth(); | 25 return new Bluetooth(); |
| 20 } | 26 } |
| 27 |
| 28 // BluetoothDiscovery interface |
| 29 ScriptPromise requestDevice(ScriptState*); |
| 30 |
| 31 DEFINE_INLINE_TRACE() |
| 32 { |
| 33 visitor->trace(m_bluetoothDiscovery); |
| 34 } |
| 35 |
| 36 private: |
| 37 Member<BluetoothDiscovery> m_bluetoothDiscovery; |
| 38 BluetoothDiscovery* bluetoothDiscovery(); |
| 21 }; | 39 }; |
| 22 | 40 |
| 23 } // namespace blink | 41 } // namespace blink |
| 24 | 42 |
| 25 #endif // Bluetooth_h | 43 #endif // Bluetooth_h |
| OLD | NEW |