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

Unified Diff: third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom

Issue 1922923002: bluetooth: Move requestDevice to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-request-device
Patch Set: Change ref to pointer Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/public/platform/modules/bluetooth/WebRequestDeviceOptions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8ff08ae06336079d7ac18fba135fe20641d8331..d89f5a3915fe6c4a6dce512fe529aeb526102f83 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
+++ b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
@@ -68,6 +68,17 @@ enum WebBluetoothError {
ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME,
};
+struct WebBluetoothScanFilter {
+ array<string>? services;
+ string? name;
+ string? name_prefix;
+};
+
+struct WebBluetoothRequestDeviceOptions {
+ array<WebBluetoothScanFilter> filters;
+ array<string> optional_services;
+};
+
// Indicates if the function will return a single or multiple
// GATT objects.
enum WebBluetoothGATTQueryQuantity {
@@ -75,6 +86,12 @@ enum WebBluetoothGATTQueryQuantity {
MULTIPLE
};
+struct WebBluetoothDevice {
+ string id;
+ string name;
+ array<string> uuids;
+};
+
struct WebBluetoothRemoteGATTService {
string instance_id;
string uuid;
@@ -97,6 +114,9 @@ interface WebBluetoothService {
// a device disconnects.
SetClient(associated WebBluetoothServiceClient client);
+ RequestDevice(WebBluetoothRequestDeviceOptions options)
+ => (WebBluetoothError error, 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
« no previous file with comments | « third_party/WebKit/public/platform/modules/bluetooth/WebRequestDeviceOptions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698