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

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: Add DCHECK for enum 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..08675c5921eee7c019abe897b3e11f38c7745194 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 /* Corresponds to WebBluetoothError in web_bluetooth.mojom */>;
// Success and failure callbacks for GattServer.connect().
-using WebBluetoothRemoteGATTServerConnectCallbacks = WebCallbacks<void, const WebBluetoothError&>;
+using WebBluetoothRemoteGATTServerConnectCallbacks = WebCallbacks<void, int32_t /* Corresponds to WebBluetoothError in web_bluetooth.mojom */>;
// Success and failure callbacks for getPrimaryService(s).
-using WebBluetoothGetPrimaryServicesCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTService*>&, const WebBluetoothError&>;
+using WebBluetoothGetPrimaryServicesCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTService*>&, int32_t /* Corresponds to WebBluetoothError in web_bluetooth.mojom */>;
// Success and failure callbacks for getCharacteristic(s).
-using WebBluetoothGetCharacteristicsCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTCharacteristicInit*>&, const WebBluetoothError&>;
+using WebBluetoothGetCharacteristicsCallbacks = WebCallbacks<const WebVector<WebBluetoothRemoteGATTCharacteristicInit*>&, int32_t /* Corresponds to WebBluetoothError in web_bluetooth.mojom */>;
// Success and failure callbacks for readValue.
-using WebBluetoothReadValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, const WebBluetoothError&>;
+using WebBluetoothReadValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, int32_t /* Corresponds to WebBluetoothError in web_bluetooth.mojom */>;
// Success and failure callbacks for writeValue.
-using WebBluetoothWriteValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, const WebBluetoothError&>;
+using WebBluetoothWriteValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, int32_t /* Corresponds to WebBluetoothError in web_bluetooth.mojom */>;
// Success and failure callbacks for characteristic.startNotifications and
// characteristic.stopNotifications.
-using WebBluetoothNotificationsCallbacks = WebCallbacks<void, const WebBluetoothError&>;
+using WebBluetoothNotificationsCallbacks = WebCallbacks<void, int32_t /* Corresponds to WebBluetoothError in web_bluetooth.mojom */>;
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 /* Corresponds to WebBluetoothGATTQueryQuantity in web_bluetooth.mojom */,
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 /* Corresponds to WebBluetoothGATTQueryQuantity in web_bluetooth.mojom */,
const WebString& characteristicsUUID,
WebBluetoothGetCharacteristicsCallbacks*) = 0;
« no previous file with comments | « third_party/WebKit/public/blink_headers.gypi ('k') | third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698