Chromium Code Reviews| Index: Source/modules/bluetooth/BluetoothGATTRemoteServer.h |
| diff --git a/Source/modules/bluetooth/BluetoothGATTRemoteServer.h b/Source/modules/bluetooth/BluetoothGATTRemoteServer.h |
| index ffea825dd4bf309348352a31d409c478cfd2a069..097345de638615fab288119f9729c8d25af2db65 100644 |
| --- a/Source/modules/bluetooth/BluetoothGATTRemoteServer.h |
| +++ b/Source/modules/bluetooth/BluetoothGATTRemoteServer.h |
| @@ -7,18 +7,40 @@ |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "platform/heap/Heap.h" |
| +#include "public/platform/modules/bluetooth/WebBluetoothGATTRemoteServer.h" |
| namespace blink { |
| +class ScriptPromiseResolver; |
| + |
| // BluetoothGATTRemoteServer provides a way to interact with a connected bluetooth peripheral. |
| +// |
| +// Callbacks providing WebBluetoothGATTRemoteServer objects are handled by |
| +// CallbackPromiseAdapter templatized with this class. See this class's |
| +// "Interface required by CallbackPromiseAdapter" section and the |
| +// CallbackPromiseAdapter class comments. |
| class BluetoothGATTRemoteServer final |
| - : public GarbageCollected<BluetoothGATTRemoteServer> |
| + : public GarbageCollectedFinalized<BluetoothGATTRemoteServer> |
|
scheib
2015/04/21 17:57:29
I don't think we need this object to be Finalized,
ortuno
2015/04/21 19:54:07
WebBluetoothGATTRemoteServer needs to be finalized
|
| , public ScriptWrappable { |
| DEFINE_WRAPPERTYPEINFO(); |
| public: |
| + BluetoothGATTRemoteServer(const WebBluetoothGATTRemoteServer&); |
| + |
| + static BluetoothGATTRemoteServer* create(const WebBluetoothGATTRemoteServer&); |
| + |
| + // Interface required by CallbackPromiseAdapter: |
| + typedef WebBluetoothGATTRemoteServer WebType; |
| + static BluetoothGATTRemoteServer* take(ScriptPromiseResolver*, WebBluetoothGATTRemoteServer*); |
| + static void dispose(WebBluetoothGATTRemoteServer*); |
| // Interface required by Garbage Collectoin: |
| DEFINE_INLINE_TRACE() { } |
| + |
| + // IDL exposed interface: |
| + bool connected() { return m_webGATT.connected; } |
| + |
| +private: |
| + WebBluetoothGATTRemoteServer m_webGATT; |
| }; |
| } // namespace blink |