Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h |
| diff --git a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h |
| index a07941331333c5255f85247e6cf87c79dc453374..f2fd06edc25a723dadaca2463aa0508a3d879cd7 100644 |
| --- a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h |
| +++ b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h |
| @@ -8,8 +8,6 @@ |
| #include "public/platform/WebCallbacks.h" |
| #include "public/platform/WebString.h" |
| #include "public/platform/WebVector.h" |
| -#include "public/platform/modules/bluetooth/WebBluetoothError.h" |
| -#include "public/platform/modules/bluetooth/web_bluetooth.mojom.h" |
| #include <memory> |
| @@ -24,26 +22,26 @@ struct WebBluetoothRemoteGATTService; |
| struct WebRequestDeviceOptions; |
| // Success and failure callbacks for requestDevice. |
| -using WebBluetoothRequestDeviceCallbacks = WebCallbacks<std::unique_ptr<WebBluetoothDeviceInit>, const WebBluetoothError&>; |
| +using WebBluetoothRequestDeviceCallbacks = WebCallbacks<std::unique_ptr<WebBluetoothDeviceInit>, int32_t>; |
|
Jeffrey Yasskin
2016/07/13 20:34:58
Please comment which enum each of these expects to
ortuno
2016/07/13 22:47:29
Done.
|
| // Success and failure callbacks for GattServer.connect(). |
| -using WebBluetoothRemoteGATTServerConnectCallbacks = WebCallbacks<void, const WebBluetoothError&>; |
| +using WebBluetoothRemoteGATTServerConnectCallbacks = WebCallbacks<void, int32_t>; |
| // Success and failure callbacks for getPrimaryService(s). |
| -using WebBluetoothGetPrimaryServicesCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTService*>&, const WebBluetoothError&>; |
| +using WebBluetoothGetPrimaryServicesCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTService*>&, int32_t>; |
| // Success and failure callbacks for getCharacteristic(s). |
| -using WebBluetoothGetCharacteristicsCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTCharacteristicInit*>&, const WebBluetoothError&>; |
| +using WebBluetoothGetCharacteristicsCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTCharacteristicInit*>&, int32_t>; |
| // Success and failure callbacks for readValue. |
| -using WebBluetoothReadValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, const WebBluetoothError&>; |
| +using WebBluetoothReadValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, int32_t>; |
| // Success and failure callbacks for writeValue. |
| -using WebBluetoothWriteValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, const WebBluetoothError&>; |
| +using WebBluetoothWriteValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, int32_t>; |
| // Success and failure callbacks for characteristic.startNotifications and |
| // characteristic.stopNotifications. |
| -using WebBluetoothNotificationsCallbacks = WebCallbacks<void, const WebBluetoothError&>; |
| +using WebBluetoothNotificationsCallbacks = WebCallbacks<void, int32_t>; |
| class WebBluetooth { |
| public: |
| @@ -63,14 +61,14 @@ public: |
| WebBluetoothRemoteGATTServerConnectCallbacks*) {} |
| virtual void disconnect(const WebString& deviceId) = 0; |
| virtual void getPrimaryServices(const WebString& deviceId, |
| - mojom::WebBluetoothGATTQueryQuantity, |
| + int32_t quantity, |
|
Jeffrey Yasskin
2016/07/13 20:34:59
Ditto here.
ortuno
2016/07/13 22:47:29
Done.
|
| const WebString& servicesUUID, |
| WebBluetoothGetPrimaryServicesCallbacks*) = 0; |
| // BluetoothRemoteGATTService methods: |
| // See https://webbluetoothchrome.github.io/web-bluetooth/#idl-def-bluetoothgattservice |
| virtual void getCharacteristics(const WebString& serviceInstanceID, |
| - mojom::WebBluetoothGATTQueryQuantity, |
| + int32_t quantity, |
| const WebString& characteristicsUUID, |
| WebBluetoothGetCharacteristicsCallbacks*) = 0; |