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

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: Address jyasskin's comments 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);
100
91 // Callbacks for BluetoothGattCharacteristic::WriteRemoteCharacteristic. 101 // Callbacks for BluetoothGattCharacteristic::WriteRemoteCharacteristic.
92 void OnWriteValueSuccess( 102 void OnWriteValueSuccess(
93 const RemoteCharacteristicWriteValueCallback& callback); 103 const RemoteCharacteristicWriteValueCallback& callback);
94 void OnWriteValueFailed( 104 void OnWriteValueFailed(
95 const RemoteCharacteristicWriteValueCallback& callback, 105 const RemoteCharacteristicWriteValueCallback& callback,
96 device::BluetoothGattService::GattErrorCode error_code); 106 device::BluetoothGattService::GattErrorCode error_code);
97 107
98 // Callbacks for BluetoothGattCharacteristic::StartNotifySession. 108 // Callbacks for BluetoothGattCharacteristic::StartNotifySession.
99 void OnStartNotifySessionSuccess( 109 void OnStartNotifySessionSuccess(
100 const RemoteCharacteristicStartNotificationsCallback& callback, 110 const RemoteCharacteristicStartNotificationsCallback& callback,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 mojo::Binding<blink::mojom::WebBluetoothService> binding_; 143 mojo::Binding<blink::mojom::WebBluetoothService> binding_;
134 144
135 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; 145 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_;
136 146
137 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); 147 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl);
138 }; 148 };
139 149
140 } // namespace content 150 } // namespace content
141 151
142 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ 152 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/bluetooth/bluetooth_dispatcher_host.cc ('k') | content/browser/bluetooth/web_bluetooth_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698