Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(915)

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h

Issue 2718583002: Refactor WebBluetoothServiceClient in the web_bluetooth.mojom (Closed)
Patch Set: address more comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
index 30876f75ee136e8d7f3a7f1bcb3f9f136806a9c0..02f687ffacbbd146418e268f2820d27d83e7214b 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
@@ -32,7 +32,6 @@ class ScriptPromiseResolver;
// CallbackPromiseAdapter class comments.
class BluetoothDevice final : public EventTargetWithInlineData,
public ContextLifecycleObserver {
ortuno 2017/03/09 23:16:38 Does BluetoothDevice still need to be a ContextLif
juncai 2017/03/10 03:57:02 I think so, since it is a subclass of EventTargetW
- USING_PRE_FINALIZER(BluetoothDevice, dispose);
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(BluetoothDevice);
@@ -72,29 +71,14 @@ class BluetoothDevice final : public EventTargetWithInlineData,
// events on navigator.bluetooth and still remain connected even if the
// BluetoothDevice object is garbage collected.
- // USING_PRE_FINALIZER interface.
- // Called before the object gets garbage collected.
- void dispose();
-
- // ContextLifecycleObserver interface.
- void contextDestroyed(ExecutionContext*) override;
-
- // If gatt is connected then sets gatt.connected to false and disconnects.
- // This function only performs the necessary steps to ensure a device
- // disconnects therefore it should only be used when the object is being
- // garbage collected or the context is being destroyed.
- void disconnectGATTIfConnected();
-
// Performs necessary cleanup when a device disconnects and fires
// gattserverdisconnected event.
- void cleanupDisconnectedDeviceAndFireEvent();
+ void clearAttributeInstanceMapAndFireEvent();
// EventTarget methods:
const AtomicString& interfaceName() const override;
ExecutionContext* getExecutionContext() const override;
- void dispatchGattServerDisconnected();
-
Bluetooth* bluetooth() { return m_bluetooth; }
// Interface required by Garbage Collection:

Powered by Google App Engine
This is Rietveld 408576698