Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom |
| diff --git a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom |
| index ddd5fd76bd75bc6ee6b70ad78327bb766cce8750..7bccbb26cbd81b7db4fd277393f19ef8a93fd002 100644 |
| --- a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom |
| +++ b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom |
| @@ -160,11 +160,6 @@ struct WebBluetoothRemoteGATTDescriptor { |
| // Web Bluetooth Interface that Blink can use to perform |
| // Bluetooth GATT Operations on Bluetooth Devices. |
| interface WebBluetoothService { |
| - // Sets the client for this WebBluetoothService. The service will notify the |
| - // client of device events e.g. when a Characteristic's value changes or when |
| - // a device disconnects. |
| - SetClient(associated WebBluetoothServiceClient client); |
| - |
| RequestDevice(WebBluetoothRequestDeviceOptions options) |
| => (WebBluetoothResult result, WebBluetoothDevice? device); |
| @@ -172,7 +167,9 @@ interface WebBluetoothService { |
| // if a connection to the device didn't exist already. If a GATT connection |
| // existed already then this function increases the ref count to keep that |
| // connection alive. |
| - RemoteServerConnect(WebBluetoothDeviceId device_id) => (WebBluetoothResult result); |
| + RemoteServerConnect(WebBluetoothDeviceId device_id) => ( |
| + WebBluetoothResult result, |
| + associated WebBluetoothServerClient&? client_request); |
| // If a GATT connection exists for Device identified by |device_id| then |
| // decreases the ref count for that connection. |
| @@ -224,7 +221,9 @@ interface WebBluetoothService { |
| // Starts notifications for the characteristic identified by |
| // |characteristic_instance_id|. |
| RemoteCharacteristicStartNotifications( |
| - string characteristic_instance_id) => (WebBluetoothResult result); |
| + string characteristic_instance_id) => ( |
| + WebBluetoothResult result, |
| + associated WebBluetoothCharacteristicClient&? client_request); |
| // Stops notifications for the characteristic identified by |
| // |characteristic_instance_id|. |
| @@ -263,15 +262,10 @@ interface WebBluetoothService { |
| array<uint8> value) => (WebBluetoothResult result); |
| }; |
| -// Classes should implement this interface and pass an associated pointer |
| -// bound to them to the WebBluetoothService by using SetClient. Classes |
| -// that do this will be notified of device events e.g. device disconnection. |
| -interface WebBluetoothServiceClient { |
| - // The characteristic identified by |characteristic_instance_id| has received |
| - // a notification of value change. |
| - RemoteCharacteristicValueChanged(string characteristic_instance_id, |
| - array<uint8> value); |
| +interface WebBluetoothCharacteristicClient { |
|
ortuno
2017/03/01 04:52:06
Please add comments to both functions.
juncai
2017/03/02 03:23:50
Done.
|
| + RemoteCharacteristicValueChanged(array<uint8> value); |
| +}; |
| - // The device identified by |device_id| has been disconnected. |
| - GattServerDisconnected(WebBluetoothDeviceId device_id); |
| +interface WebBluetoothServerClient { |
| + GattServerDisconnected(); |
|
ortuno
2017/03/01 04:52:06
nit: GATTServerDisconnected();
juncai
2017/03/02 03:23:49
Done.
|
| }; |