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

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

Issue 2680783002: bluetooth: show better error messages for services, characteristics and descriptors (Closed)
Patch Set: Rebased on master. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module blink.mojom; 5 module blink.mojom;
6 6
7 import "device/bluetooth/public/interfaces/uuid.mojom"; 7 import "device/bluetooth/public/interfaces/uuid.mojom";
8 8
9 // Bluetooth Terminology: 9 // Bluetooth Terminology:
10 // 10 //
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 CONNECT_OFFSET_INVALID, 63 CONNECT_OFFSET_INVALID,
64 CONNECT_READ_NOT_PERMITTED, 64 CONNECT_READ_NOT_PERMITTED,
65 CONNECT_REQUEST_NOT_SUPPORTED, 65 CONNECT_REQUEST_NOT_SUPPORTED,
66 CONNECT_UNKNOWN_ERROR, 66 CONNECT_UNKNOWN_ERROR,
67 CONNECT_UNKNOWN_FAILURE, 67 CONNECT_UNKNOWN_FAILURE,
68 CONNECT_UNSUPPORTED_DEVICE, 68 CONNECT_UNSUPPORTED_DEVICE,
69 CONNECT_WRITE_NOT_PERMITTED, 69 CONNECT_WRITE_NOT_PERMITTED,
70 DEVICE_NO_LONGER_IN_RANGE, 70 DEVICE_NO_LONGER_IN_RANGE,
71 GATT_NOT_PAIRED, 71 GATT_NOT_PAIRED,
72 GATT_OPERATION_IN_PROGRESS, 72 GATT_OPERATION_IN_PROGRESS,
73 GATT_SERVER_DISCONNECTED,
74 GATT_SERVER_NOT_CONNECTED,
75 GATT_SERVER_DISCONNECTED_WHILE_RETRIEVING_CHARACTERISTICS,
76 GATT_SERVER_NOT_CONNECTED_CANNOT_RETRIEVE_CHARACTERISTICS,
73 UNTRANSLATED_CONNECT_ERROR_CODE, 77 UNTRANSLATED_CONNECT_ERROR_CODE,
74 // NotFoundError: 78 // NotFoundError:
75 NO_BLUETOOTH_ADAPTER, 79 NO_BLUETOOTH_ADAPTER,
76 CHOSEN_DEVICE_VANISHED, 80 CHOSEN_DEVICE_VANISHED,
77 CHOOSER_CANCELLED, 81 CHOOSER_CANCELLED,
78 CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED, 82 CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED,
79 CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED, 83 CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED,
80 CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, 84 CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN,
81 SERVICE_NOT_FOUND, 85 SERVICE_NOT_FOUND,
82 NO_SERVICES_FOUND, 86 NO_SERVICES_FOUND,
(...skipping 12 matching lines...) Expand all
95 // SecurityError: 99 // SecurityError:
96 GATT_NOT_AUTHORIZED, 100 GATT_NOT_AUTHORIZED,
97 BLOCKLISTED_DESCRIPTOR_UUID, 101 BLOCKLISTED_DESCRIPTOR_UUID,
98 BLOCKLISTED_CHARACTERISTIC_UUID, 102 BLOCKLISTED_CHARACTERISTIC_UUID,
99 BLOCKLISTED_READ, 103 BLOCKLISTED_READ,
100 BLOCKLISTED_WRITE, 104 BLOCKLISTED_WRITE,
101 NOT_ALLOWED_TO_ACCESS_ANY_SERVICE, 105 NOT_ALLOWED_TO_ACCESS_ANY_SERVICE,
102 NOT_ALLOWED_TO_ACCESS_SERVICE, 106 NOT_ALLOWED_TO_ACCESS_SERVICE,
103 REQUEST_DEVICE_WITH_BLOCKLISTED_UUID, 107 REQUEST_DEVICE_WITH_BLOCKLISTED_UUID,
104 REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, 108 REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME,
105 REQUEST_DEVICE_WITHOUT_FRAME,
106 DESCRIPTOR_NO_LONGER_EXISTS, 109 DESCRIPTOR_NO_LONGER_EXISTS,
107 }; 110 };
108 111
109 struct WebBluetoothScanFilter { 112 struct WebBluetoothScanFilter {
110 array<bluetooth.mojom.UUID>? services; 113 array<bluetooth.mojom.UUID>? services;
111 string? name; 114 string? name;
112 string? name_prefix; 115 string? name_prefix;
113 }; 116 };
114 117
115 struct WebBluetoothRequestDeviceOptions { 118 struct WebBluetoothRequestDeviceOptions {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // that do this will be notified of device events e.g. device disconnection. 268 // that do this will be notified of device events e.g. device disconnection.
266 interface WebBluetoothServiceClient { 269 interface WebBluetoothServiceClient {
267 // The characteristic identified by |characteristic_instance_id| has received 270 // The characteristic identified by |characteristic_instance_id| has received
268 // a notification of value change. 271 // a notification of value change.
269 RemoteCharacteristicValueChanged(string characteristic_instance_id, 272 RemoteCharacteristicValueChanged(string characteristic_instance_id,
270 array<uint8> value); 273 array<uint8> value);
271 274
272 // The device identified by |device_id| has been disconnected. 275 // The device identified by |device_id| has been disconnected.
273 GattServerDisconnected(WebBluetoothDeviceId device_id); 276 GattServerDisconnected(WebBluetoothDeviceId device_id);
274 }; 277 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698