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

Unified Diff: third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h

Issue 2142813003: bluetooth: Avoid including non-blink mojo bindings in blink code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Go back to static cast Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698