| 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 5cc217e415f8db9207f3060b87f903b3efb3fa6d..1abcc3686e47ac1afa430182d199b32e19a782f9 100644
|
| --- a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
|
| +++ b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
|
| @@ -6,13 +6,13 @@ module blink.mojom;
|
|
|
| import "device/bluetooth/public/interfaces/uuid.mojom";
|
|
|
| -// Errors that can occur during Web Bluetooth execution, which are transformed
|
| -// to a DOMException in Source/modules/bluetooth/BluetoothError.cpp.
|
| +// Result codes that can occur during Web Bluetooth execution, which are
|
| +// transformed to a DOMException in Source/modules/bluetooth/BluetoothError.cpp.
|
| //
|
| // These errors all produce constant message strings. If a particular message
|
| // needs a dynamic component, we should add a separate enum so type-checking the
|
| // IPC ensures the dynamic component is passed.
|
| -enum WebBluetoothError {
|
| +enum WebBluetoothResult {
|
| SUCCESS,
|
| // AbortError:
|
| // InvalidModificationError:
|
| @@ -118,13 +118,13 @@ interface WebBluetoothService {
|
| SetClient(associated WebBluetoothServiceClient client);
|
|
|
| RequestDevice(WebBluetoothRequestDeviceOptions options)
|
| - => (WebBluetoothError error, WebBluetoothDevice? device);
|
| + => (WebBluetoothResult result, WebBluetoothDevice? device);
|
|
|
| // Creates a GATT Connection to a Bluetooth Device with |device_id| 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) => (WebBluetoothError error);
|
| + RemoteServerConnect(WebBluetoothDeviceId device_id) => (WebBluetoothResult result);
|
|
|
| // If a GATT connection exists for Device with |device_id| then decreases
|
| // the ref count for that connection.
|
| @@ -138,7 +138,7 @@ interface WebBluetoothService {
|
| WebBluetoothDeviceId device_id,
|
| WebBluetoothGATTQueryQuantity quantity,
|
| bluetooth.mojom.UUID? services_uuid) => (
|
| - WebBluetoothError error,
|
| + WebBluetoothResult result,
|
| array<WebBluetoothRemoteGATTService>? services);
|
|
|
| // Returns the Characteristics of a GATT Service with |service_instance_id|.
|
| @@ -148,31 +148,31 @@ interface WebBluetoothService {
|
| string service_instance_id,
|
| WebBluetoothGATTQueryQuantity quantity,
|
| bluetooth.mojom.UUID? characteristics_uuid) => (
|
| - WebBluetoothError error,
|
| + WebBluetoothResult result,
|
| array<WebBluetoothRemoteGATTCharacteristic>? characteristics);
|
|
|
| // Reads the value for characteristic with
|
| // |characteristic_instance_id|. If the value is successfully read the
|
| - // callback will be run with WebBluetoothError::SUCCESS and the
|
| + // callback will be run with WebBluetoothResult::SUCCESS and the
|
| // characteristic's value. If the value is not successfully read the
|
| // callback with be run with the corresponding error and nullptr for value.
|
| RemoteCharacteristicReadValue(
|
| string characteristic_instance_id) => (
|
| - WebBluetoothError error,
|
| + WebBluetoothResult result,
|
| array<uint8>? value);
|
|
|
| // Writes a value to the characteristic with
|
| // |characteristic_instance_id|. The callback is run with
|
| - // WebBluetoothError::SUCCESS if the value was successfully
|
| + // WebBluetoothResult::SUCCESS if the value was successfully
|
| // written.
|
| RemoteCharacteristicWriteValue(
|
| string characteristic_instance_id,
|
| - array<uint8> value) => (WebBluetoothError error);
|
| + array<uint8> value) => (WebBluetoothResult result);
|
|
|
| // Starts notifications for the characteristic with
|
| // |characteristic_instance_id|.
|
| RemoteCharacteristicStartNotifications(
|
| - string characteristic_instance_id) => (WebBluetoothError error);
|
| + string characteristic_instance_id) => (WebBluetoothResult result);
|
|
|
| // Stops notifications for the characteristic with
|
| // |characteristic_instance_id|.
|
|
|