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

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

Issue 2015463004: bluetooth: Use BluetoothUUID instead of string when sending uuids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-request-device
Patch Set: Lint Created 4 years, 6 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void SetClient( 94 void SetClient(
95 blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) override; 95 blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) override;
96 void RequestDevice(blink::mojom::WebBluetoothRequestDeviceOptionsPtr options, 96 void RequestDevice(blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
97 const RequestDeviceCallback& callback) override; 97 const RequestDeviceCallback& callback) override;
98 void RemoteServerConnect( 98 void RemoteServerConnect(
99 const mojo::String& device_id, 99 const mojo::String& device_id,
100 const RemoteServerConnectCallback& callback) override; 100 const RemoteServerConnectCallback& callback) override;
101 void RemoteServerDisconnect(const mojo::String& device_id) override; 101 void RemoteServerDisconnect(const mojo::String& device_id) override;
102 void RemoteServerGetPrimaryService( 102 void RemoteServerGetPrimaryService(
103 const mojo::String& device_id, 103 const mojo::String& device_id,
104 const mojo::String& service_uuid, 104 const std::unique_ptr<device::BluetoothUUID>& service_uuid,
105 const RemoteServerGetPrimaryServiceCallback& callback) override; 105 const RemoteServerGetPrimaryServiceCallback& callback) override;
106 void RemoteServiceGetCharacteristics( 106 void RemoteServiceGetCharacteristics(
107 const mojo::String& service_instance_id, 107 const mojo::String& service_instance_id,
108 blink::mojom::WebBluetoothGATTQueryQuantity quantity, 108 blink::mojom::WebBluetoothGATTQueryQuantity quantity,
109 const mojo::String& characteristics_uuid, 109 const std::unique_ptr<device::BluetoothUUID>& characteristics_uuid,
110 const RemoteServiceGetCharacteristicsCallback& callback) override; 110 const RemoteServiceGetCharacteristicsCallback& callback) override;
111 void RemoteCharacteristicReadValue( 111 void RemoteCharacteristicReadValue(
112 const mojo::String& characteristic_instance_id, 112 const mojo::String& characteristic_instance_id,
113 const RemoteCharacteristicReadValueCallback& callback) override; 113 const RemoteCharacteristicReadValueCallback& callback) override;
114 void RemoteCharacteristicWriteValue( 114 void RemoteCharacteristicWriteValue(
115 const mojo::String& characteristic_instance_id, 115 const mojo::String& characteristic_instance_id,
116 mojo::Array<uint8_t> value, 116 mojo::Array<uint8_t> value,
117 const RemoteCharacteristicWriteValueCallback& callback) override; 117 const RemoteCharacteristicWriteValueCallback& callback) override;
118 void RemoteCharacteristicStartNotifications( 118 void RemoteCharacteristicStartNotifications(
119 const mojo::String& characteristic_instance_id, 119 const mojo::String& characteristic_instance_id,
120 const RemoteCharacteristicStartNotificationsCallback& callback) override; 120 const RemoteCharacteristicStartNotificationsCallback& callback) override;
121 void RemoteCharacteristicStopNotifications( 121 void RemoteCharacteristicStopNotifications(
122 const mojo::String& characteristic_instance_id, 122 const mojo::String& characteristic_instance_id,
123 const RemoteCharacteristicStopNotificationsCallback& callback) override; 123 const RemoteCharacteristicStopNotificationsCallback& callback) override;
124 124
125 void RequestDeviceImpl( 125 void RequestDeviceImpl(
126 blink::mojom::WebBluetoothRequestDeviceOptionsPtr options, 126 blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
127 const RequestDeviceCallback& callback, 127 const RequestDeviceCallback& callback,
128 device::BluetoothAdapter* adapter); 128 device::BluetoothAdapter* adapter);
129 129
130 // Should only be run after the services have been discovered for 130 // Should only be run after the services have been discovered for
131 // |device_address|. 131 // |device_address|.
132 void RemoteServerGetPrimaryServiceImpl( 132 void RemoteServerGetPrimaryServiceImpl(
133 const std::string& service_uuid, 133 std::unique_ptr<device::BluetoothUUID> service_uuid,
134 const RemoteServerGetPrimaryServiceCallback& callback, 134 const RemoteServerGetPrimaryServiceCallback& callback,
135 device::BluetoothDevice* device); 135 device::BluetoothDevice* device);
136 136
137 // Callbacks for BluetoothDeviceChooserController::GetDevice. 137 // Callbacks for BluetoothDeviceChooserController::GetDevice.
138 void OnGetDeviceSuccess( 138 void OnGetDeviceSuccess(
139 const RequestDeviceCallback& callback, 139 const RequestDeviceCallback& callback,
140 blink::mojom::WebBluetoothRequestDeviceOptionsPtr options, 140 blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
141 const std::string& device_id); 141 const std::string& device_id);
142 void OnGetDeviceFailed(const RequestDeviceCallback& callback, 142 void OnGetDeviceFailed(const RequestDeviceCallback& callback,
143 blink::mojom::WebBluetoothError error); 143 blink::mojom::WebBluetoothError error);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 mojo::Binding<blink::mojom::WebBluetoothService> binding_; 246 mojo::Binding<blink::mojom::WebBluetoothService> binding_;
247 247
248 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; 248 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_;
249 249
250 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); 250 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl);
251 }; 251 };
252 252
253 } // namespace content 253 } // namespace content
254 254
255 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ 255 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698