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 43ac52f4eb03240f67985e71cd4592ad660db64d..c176dcbc6db0a9036c0e120e490755557f1a6870 100644 |
--- a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom |
+++ b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom |
@@ -157,11 +157,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); |
@@ -169,7 +164,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. |
@@ -221,7 +218,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); |
ortuno
2017/02/24 03:28:52
As you mentioned now that we no longer have a glob
juncai
2017/03/01 02:04:12
I will do this in a separate CL.
juncai
2017/03/02 03:23:38
I opened an issue at:
https://bugs.chromium.org/p/
|
// Stops notifications for the characteristic identified by |
// |characteristic_instance_id|. |
@@ -260,15 +259,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 { |
+ RemoteCharacteristicValueChanged(array<uint8> value); |
+}; |
- // The device identified by |device_id| has been disconnected. |
- GattServerDisconnected(WebBluetoothDeviceId device_id); |
+interface WebBluetoothServerClient { |
+ GattServerDisconnected(); |
}; |