Chromium Code Reviews| 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 "modules/bluetooth/BluetoothInteraction.h" | |
| 12 #include "platform/heap/Handle.h" | |
| 10 | 13 |
| 11 namespace blink { | 14 namespace blink { |
| 12 | 15 |
| 13 class Bluetooth final | 16 class ScriptPromise; |
| 14 : public BluetoothDiscovery { | 17 class ScriptState; |
| 18 | |
| 19 class Bluetooth | |
| 20 : public GarbageCollected<Bluetooth> | |
| 21 , public ScriptWrappable { | |
| 15 DEFINE_WRAPPERTYPEINFO(); | 22 DEFINE_WRAPPERTYPEINFO(); |
| 16 public: | 23 public: |
| 17 static Bluetooth* create() | 24 static Bluetooth* create() |
| 18 { | 25 { |
| 19 return new Bluetooth(); | 26 return new Bluetooth(); |
| 20 } | 27 } |
| 28 | |
| 29 // BluetoothDiscovery interface | |
| 30 ScriptPromise requestDevice(ScriptState*); | |
| 31 | |
| 32 DEFINE_INLINE_TRACE() | |
| 33 { | |
| 34 visitor->trace(m_bluetoothDiscovery); | |
| 35 visitor->trace(m_bluetoothInteraction); | |
| 36 } | |
| 37 private: | |
| 38 Member<BluetoothDiscovery> m_bluetoothDiscovery; | |
|
scheib
2015/04/25 04:01:01
I think these can be direct members, not requiring
ortuno
2015/04/27 22:22:01
Done.
| |
| 39 Member<BluetoothInteraction> m_bluetoothInteraction; | |
| 40 BluetoothDiscovery* bluetoothDiscovery(); | |
| 41 | |
| 21 }; | 42 }; |
| 22 | 43 |
| 23 } // namespace blink | 44 } // namespace blink |
| 24 | 45 |
| 25 #endif // Bluetooth_h | 46 #endif // Bluetooth_h |
| OLD | NEW |