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

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

Issue 1865613002: bluetooth: Move read value to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-notifications
Patch Set: Merge Created 4 years, 8 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // characteristics that have been returned to the client in the past. 70 // characteristics that have been returned to the client in the past.
71 void NotifyCharacteristicValueChanged( 71 void NotifyCharacteristicValueChanged(
72 const std::string& characteristic_instance_id, 72 const std::string& characteristic_instance_id,
73 std::vector<uint8_t> value); 73 std::vector<uint8_t> value);
74 74
75 // WebBluetoothService methods: 75 // WebBluetoothService methods:
76 void SetClient( 76 void SetClient(
77 blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) override; 77 blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) override;
78 78
79 // WebBluetoothService methods: 79 // WebBluetoothService methods:
80 void RemoteCharacteristicReadValue(
81 const mojo::String& characteristic_instance_id,
82 const RemoteCharacteristicReadValueCallback& callback) override;
80 void RemoteCharacteristicWriteValue( 83 void RemoteCharacteristicWriteValue(
81 const mojo::String& characteristic_instance_id, 84 const mojo::String& characteristic_instance_id,
82 mojo::Array<uint8_t> value, 85 mojo::Array<uint8_t> value,
83 const RemoteCharacteristicWriteValueCallback& callback) override; 86 const RemoteCharacteristicWriteValueCallback& callback) override;
84 void RemoteCharacteristicStartNotifications( 87 void RemoteCharacteristicStartNotifications(
85 const mojo::String& characteristic_instance_id, 88 const mojo::String& characteristic_instance_id,
86 const RemoteCharacteristicStartNotificationsCallback& callback) override; 89 const RemoteCharacteristicStartNotificationsCallback& callback) override;
87 void RemoteCharacteristicStopNotifications( 90 void RemoteCharacteristicStopNotifications(
88 const mojo::String& characteristic_instance_id, 91 const mojo::String& characteristic_instance_id,
89 const RemoteCharacteristicStopNotificationsCallback& callback) override; 92 const RemoteCharacteristicStopNotificationsCallback& callback) override;
90 93
94 // Callbacks for BluetoothGattCharacteristic::ReadRemoteCharacteristic.
95 void OnReadValueSuccess(const RemoteCharacteristicReadValueCallback& callback,
96 const std::vector<uint8_t>& value);
97 void OnReadValueFailed(
98 const RemoteCharacteristicReadValueCallback& callback,
99 device::BluetoothGattService::GattErrorCode error_code);
91 // Callbacks for BluetoothGattCharacteristic::WriteRemoteCharacteristic. 100 // Callbacks for BluetoothGattCharacteristic::WriteRemoteCharacteristic.
Jeffrey Yasskin 2016/04/15 20:59:35 Add a blank line between groups of callbacks.
ortuno 2016/04/15 21:34:07 Done.
92 void OnWriteValueSuccess( 101 void OnWriteValueSuccess(
93 const RemoteCharacteristicWriteValueCallback& callback); 102 const RemoteCharacteristicWriteValueCallback& callback);
94 void OnWriteValueFailed( 103 void OnWriteValueFailed(
95 const RemoteCharacteristicWriteValueCallback& callback, 104 const RemoteCharacteristicWriteValueCallback& callback,
96 device::BluetoothGattService::GattErrorCode error_code); 105 device::BluetoothGattService::GattErrorCode error_code);
97 106
98 // Callbacks for BluetoothGattCharacteristic::StartNotifySession. 107 // Callbacks for BluetoothGattCharacteristic::StartNotifySession.
99 void OnStartNotifySessionSuccess( 108 void OnStartNotifySessionSuccess(
100 const RemoteCharacteristicStartNotificationsCallback& callback, 109 const RemoteCharacteristicStartNotificationsCallback& callback,
101 std::unique_ptr<device::BluetoothGattNotifySession> notify_session); 110 std::unique_ptr<device::BluetoothGattNotifySession> notify_session);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 mojo::Binding<blink::mojom::WebBluetoothService> binding_; 142 mojo::Binding<blink::mojom::WebBluetoothService> binding_;
134 143
135 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; 144 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_;
136 145
137 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); 146 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl);
138 }; 147 };
139 148
140 } // namespace content 149 } // namespace content
141 150
142 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ 151 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698