| 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class ScriptPromiseResolver; | 23 class ScriptPromiseResolver; |
| 24 class ScriptState; | 24 class ScriptState; |
| 25 | 25 |
| 26 // BluetoothDevice represents a physical bluetooth device in the DOM. See IDL. | 26 // BluetoothDevice represents a physical bluetooth device in the DOM. See IDL. |
| 27 // | 27 // |
| 28 // Callbacks providing WebBluetoothDevice objects are handled by | 28 // Callbacks providing WebBluetoothDevice objects are handled by |
| 29 // CallbackPromiseAdapter templatized with this class. See this class's | 29 // CallbackPromiseAdapter templatized with this class. See this class's |
| 30 // "Interface required by CallbackPromiseAdapter" section and the | 30 // "Interface required by CallbackPromiseAdapter" section and the |
| 31 // CallbackPromiseAdapter class comments. | 31 // CallbackPromiseAdapter class comments. |
| 32 class BluetoothDevice final | 32 class BluetoothDevice final |
| 33 : public RefCountedGarbageCollectedEventTargetWithInlineData<BluetoothDevice
> | 33 : public EventTargetWithInlineData |
| 34 , public ActiveDOMObject { | 34 , public ActiveDOMObject { |
| 35 USING_PRE_FINALIZER(BluetoothDevice, dispose); | 35 USING_PRE_FINALIZER(BluetoothDevice, dispose); |
| 36 DEFINE_WRAPPERTYPEINFO(); | 36 DEFINE_WRAPPERTYPEINFO(); |
| 37 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(BluetoothDevice); | 37 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(BluetoothDevice); |
| 38 USING_GARBAGE_COLLECTED_MIXIN(BluetoothDevice); | 38 USING_GARBAGE_COLLECTED_MIXIN(BluetoothDevice); |
| 39 public: | 39 public: |
| 40 BluetoothDevice(ExecutionContext*, PassOwnPtr<WebBluetoothDevice>); | 40 BluetoothDevice(ExecutionContext*, PassOwnPtr<WebBluetoothDevice>); |
| 41 | 41 |
| 42 // Interface required by CallbackPromiseAdapter: | 42 // Interface required by CallbackPromiseAdapter: |
| 43 using WebType = OwnPtr<WebBluetoothDevice>; | 43 using WebType = OwnPtr<WebBluetoothDevice>; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 OwnPtr<WebBluetoothDevice> m_webDevice; | 91 OwnPtr<WebBluetoothDevice> m_webDevice; |
| 92 Member<BluetoothAdvertisingData> m_adData; | 92 Member<BluetoothAdvertisingData> m_adData; |
| 93 Member<BluetoothRemoteGATTServer> m_gatt; | 93 Member<BluetoothRemoteGATTServer> m_gatt; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| 97 | 97 |
| 98 #endif // BluetoothDevice_h | 98 #endif // BluetoothDevice_h |
| OLD | NEW |