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

Side by Side Diff: content/browser/bluetooth/web_bluetooth_service_impl.h

Issue 2752663002: Remove RemoteServerDisconnect() from web_bluetooth.mojom (Closed)
Patch Set: address scheib@'s comments 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 #ifndef CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ 6 #define CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const std::string& characteristic_instance_id, 97 const std::string& characteristic_instance_id,
98 const std::vector<uint8_t>& value); 98 const std::vector<uint8_t>& value);
99 99
100 // WebBluetoothService methods: 100 // WebBluetoothService methods:
101 void RequestDevice(blink::mojom::WebBluetoothRequestDeviceOptionsPtr options, 101 void RequestDevice(blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
102 const RequestDeviceCallback& callback) override; 102 const RequestDeviceCallback& callback) override;
103 void RemoteServerConnect( 103 void RemoteServerConnect(
104 const WebBluetoothDeviceId& device_id, 104 const WebBluetoothDeviceId& device_id,
105 blink::mojom::WebBluetoothServerClientAssociatedPtrInfo client, 105 blink::mojom::WebBluetoothServerClientAssociatedPtrInfo client,
106 const RemoteServerConnectCallback& callback) override; 106 const RemoteServerConnectCallback& callback) override;
107 void RemoteServerDisconnect(const WebBluetoothDeviceId& device_id) override;
108 void RemoteServerGetPrimaryServices( 107 void RemoteServerGetPrimaryServices(
109 const WebBluetoothDeviceId& device_id, 108 const WebBluetoothDeviceId& device_id,
110 blink::mojom::WebBluetoothGATTQueryQuantity quantity, 109 blink::mojom::WebBluetoothGATTQueryQuantity quantity,
111 const base::Optional<device::BluetoothUUID>& services_uuid, 110 const base::Optional<device::BluetoothUUID>& services_uuid,
112 const RemoteServerGetPrimaryServicesCallback& callback) override; 111 const RemoteServerGetPrimaryServicesCallback& callback) override;
113 void RemoteServiceGetCharacteristics( 112 void RemoteServiceGetCharacteristics(
114 const std::string& service_instance_id, 113 const std::string& service_instance_id,
115 blink::mojom::WebBluetoothGATTQueryQuantity quantity, 114 blink::mojom::WebBluetoothGATTQueryQuantity quantity,
116 const base::Optional<device::BluetoothUUID>& characteristics_uuid, 115 const base::Optional<device::BluetoothUUID>& characteristics_uuid,
117 const RemoteServiceGetCharacteristicsCallback& callback) override; 116 const RemoteServiceGetCharacteristicsCallback& callback) override;
(...skipping 22 matching lines...) Expand all
140 void RemoteDescriptorWriteValue( 139 void RemoteDescriptorWriteValue(
141 const std::string& descriptor_instance_id, 140 const std::string& descriptor_instance_id,
142 const std::vector<uint8_t>& value, 141 const std::vector<uint8_t>& value,
143 const RemoteDescriptorWriteValueCallback& callback) override; 142 const RemoteDescriptorWriteValueCallback& callback) override;
144 143
145 void RequestDeviceImpl( 144 void RequestDeviceImpl(
146 blink::mojom::WebBluetoothRequestDeviceOptionsPtr options, 145 blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
147 const RequestDeviceCallback& callback, 146 const RequestDeviceCallback& callback,
148 device::BluetoothAdapter* adapter); 147 device::BluetoothAdapter* adapter);
149 148
149 // Called in the following two situations:
150 // 1. When a device is disconnected on the browser side.
scheib 2017/03/22 01:11:08 Let's reword to be a bit clearer, something like:
juncai 2017/03/27 20:44:46 Done.
151 // 2. When the renderer intentionally wants to disconnect from a device.
152 void HandleServerClientError(const WebBluetoothDeviceId& device_id);
scheib 2017/03/22 01:11:08 Perhaps: OnGATTServerClientDisconnection
juncai 2017/03/27 20:44:46 Done.
153
150 // Should only be run after the services have been discovered for 154 // Should only be run after the services have been discovered for
151 // |device_address|. 155 // |device_address|.
152 void RemoteServerGetPrimaryServicesImpl( 156 void RemoteServerGetPrimaryServicesImpl(
153 const WebBluetoothDeviceId& device_id, 157 const WebBluetoothDeviceId& device_id,
154 blink::mojom::WebBluetoothGATTQueryQuantity quantity, 158 blink::mojom::WebBluetoothGATTQueryQuantity quantity,
155 const base::Optional<device::BluetoothUUID>& services_uuid, 159 const base::Optional<device::BluetoothUUID>& services_uuid,
156 const RemoteServerGetPrimaryServicesCallback& callback, 160 const RemoteServerGetPrimaryServicesCallback& callback,
157 device::BluetoothDevice* device); 161 device::BluetoothDevice* device);
158 162
159 // Callbacks for BluetoothDeviceChooserController::GetDevice. 163 // Callbacks for BluetoothDeviceChooserController::GetDevice.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 mojo::Binding<blink::mojom::WebBluetoothService> binding_; 291 mojo::Binding<blink::mojom::WebBluetoothService> binding_;
288 292
289 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; 293 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_;
290 294
291 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); 295 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl);
292 }; 296 };
293 297
294 } // namespace content 298 } // namespace content
295 299
296 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ 300 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698