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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h

Issue 2752663002: Remove RemoteServerDisconnect() from web_bluetooth.mojom (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 BluetoothRemoteGATTServer_h 5 #ifndef BluetoothRemoteGATTServer_h
6 #define BluetoothRemoteGATTServer_h 6 #define BluetoothRemoteGATTServer_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/modules/v8/StringOrUnsignedLong.h" 9 #include "bindings/modules/v8/StringOrUnsignedLong.h"
10 #include "core/dom/ContextLifecycleObserver.h" 10 #include "core/dom/ContextLifecycleObserver.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool RemoveFromActiveAlgorithms(ScriptPromiseResolver*); 58 bool RemoveFromActiveAlgorithms(ScriptPromiseResolver*);
59 // Removes all ScriptPromiseResolvers from the set of Active Algorithms. 59 // Removes all ScriptPromiseResolvers from the set of Active Algorithms.
60 void ClearActiveAlgorithms() { m_activeAlgorithms.clear(); } 60 void ClearActiveAlgorithms() { m_activeAlgorithms.clear(); }
61 61
62 // If gatt is connected then sets gatt.connected to false and disconnects. 62 // If gatt is connected then sets gatt.connected to false and disconnects.
63 // This function only performs the necessary steps to ensure a device 63 // This function only performs the necessary steps to ensure a device
64 // disconnects therefore it should only be used when the object is being 64 // disconnects therefore it should only be used when the object is being
65 // garbage collected or the context is being destroyed. 65 // garbage collected or the context is being destroyed.
66 void DisconnectIfConnected(); 66 void DisconnectIfConnected();
67 67
68 // Performs necessary cleanup when a device disconnects and fires 68 // Performs necessary cleanup when a device disconnects.
69 // gattserverdisconnected event. 69 void CleanupDisconnectedDevice();
70 void CleanupDisconnectedDeviceAndFireEvent();
71 70
72 void DispatchDisconnected(); 71 void HandleClientConnectionError();
73 72
74 // USING_PRE_FINALIZER interface. 73 // USING_PRE_FINALIZER interface.
75 // Called before the object gets garbage collected. 74 // Called before the object gets garbage collected.
76 void Dispose(); 75 void Dispose();
77 76
78 // Interface required by Garbage Collectoin: 77 // Interface required by Garbage Collectoin:
79 DECLARE_VIRTUAL_TRACE(); 78 DECLARE_VIRTUAL_TRACE();
80 79
81 // IDL exposed interface: 80 // IDL exposed interface:
82 BluetoothDevice* device() { return m_device; } 81 BluetoothDevice* device() { return m_device; }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 mojo::AssociatedBinding<mojom::blink::WebBluetoothServerClient> 113 mojo::AssociatedBinding<mojom::blink::WebBluetoothServerClient>
115 m_clientBinding; 114 m_clientBinding;
116 115
117 Member<BluetoothDevice> m_device; 116 Member<BluetoothDevice> m_device;
118 bool m_connected; 117 bool m_connected;
119 }; 118 };
120 119
121 } // namespace blink 120 } // namespace blink
122 121
123 #endif // BluetoothDevice_h 122 #endif // BluetoothDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698