| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ |
| 6 #define CONTENT_RENDERER_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ | 6 #define CONTENT_RENDERER_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override; | 78 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override; |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 struct GetCharacteristicsCallback; | 81 struct GetCharacteristicsCallback; |
| 82 // WebBluetoothServiceClient methods: | 82 // WebBluetoothServiceClient methods: |
| 83 void RemoteCharacteristicValueChanged( | 83 void RemoteCharacteristicValueChanged( |
| 84 const mojo::String& characteristic_instance_id, | 84 const mojo::String& characteristic_instance_id, |
| 85 mojo::Array<uint8_t> value) override; | 85 mojo::Array<uint8_t> value) override; |
| 86 | 86 |
| 87 // Callbacks for WebBluetoothService calls: | 87 // Callbacks for WebBluetoothService calls: |
| 88 void OnConnectComplete( |
| 89 std::unique_ptr<blink::WebBluetoothRemoteGATTServerConnectCallbacks> |
| 90 callbacks, |
| 91 blink::mojom::WebBluetoothError error); |
| 88 void OnGetPrimaryServiceComplete( | 92 void OnGetPrimaryServiceComplete( |
| 89 const blink::WebString& device_id, | 93 const blink::WebString& device_id, |
| 90 std::unique_ptr<blink::WebBluetoothGetPrimaryServiceCallbacks> callbacks, | 94 std::unique_ptr<blink::WebBluetoothGetPrimaryServiceCallbacks> callbacks, |
| 91 blink::mojom::WebBluetoothError error, | 95 blink::mojom::WebBluetoothError error, |
| 92 blink::mojom::WebBluetoothRemoteGATTServicePtr service); | 96 blink::mojom::WebBluetoothRemoteGATTServicePtr service); |
| 93 void OnGetCharacteristicsComplete( | 97 void OnGetCharacteristicsComplete( |
| 94 const blink::WebString& service_instance_id, | 98 const blink::WebString& service_instance_id, |
| 95 std::unique_ptr<blink::WebBluetoothGetCharacteristicsCallbacks> callbacks, | 99 std::unique_ptr<blink::WebBluetoothGetCharacteristicsCallbacks> callbacks, |
| 96 blink::mojom::WebBluetoothError error, | 100 blink::mojom::WebBluetoothError error, |
| 97 mojo::Array<blink::mojom::WebBluetoothRemoteGATTCharacteristicPtr> | 101 mojo::Array<blink::mojom::WebBluetoothRemoteGATTCharacteristicPtr> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 136 |
| 133 const scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 137 const scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 134 const int frame_routing_id_; | 138 const int frame_routing_id_; |
| 135 | 139 |
| 136 DISALLOW_COPY_AND_ASSIGN(WebBluetoothImpl); | 140 DISALLOW_COPY_AND_ASSIGN(WebBluetoothImpl); |
| 137 }; | 141 }; |
| 138 | 142 |
| 139 } // namespace content | 143 } // namespace content |
| 140 | 144 |
| 141 #endif // CONTENT_RENDERER_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ | 145 #endif // CONTENT_RENDERER_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ |
| OLD | NEW |