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 #include "content/child/bluetooth/web_bluetooth_impl.h" | 5 #include "content/child/bluetooth/web_bluetooth_impl.h" |
6 | 6 |
7 #include "content/child/bluetooth/bluetooth_dispatcher.h" | 7 #include "content/child/bluetooth/bluetooth_dispatcher.h" |
8 #include "content/child/thread_safe_sender.h" | 8 #include "content/child/thread_safe_sender.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 GetDispatcher()->getCharacteristic(service_instance_id, characteristic_uuid, | 42 GetDispatcher()->getCharacteristic(service_instance_id, characteristic_uuid, |
43 callbacks); | 43 callbacks); |
44 } | 44 } |
45 | 45 |
46 void WebBluetoothImpl::readValue( | 46 void WebBluetoothImpl::readValue( |
47 const blink::WebString& characteristic_instance_id, | 47 const blink::WebString& characteristic_instance_id, |
48 blink::WebBluetoothReadValueCallbacks* callbacks) { | 48 blink::WebBluetoothReadValueCallbacks* callbacks) { |
49 GetDispatcher()->readValue(characteristic_instance_id, callbacks); | 49 GetDispatcher()->readValue(characteristic_instance_id, callbacks); |
50 } | 50 } |
51 | 51 |
| 52 void WebBluetoothImpl::writeValue( |
| 53 const blink::WebString& characteristic_instance_id, |
| 54 const std::vector<uint8_t>& value, |
| 55 blink::WebBluetoothWriteValueCallbacks* callbacks) { |
| 56 GetDispatcher()->writeValue(characteristic_instance_id, value, callbacks); |
| 57 } |
| 58 |
52 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { | 59 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { |
53 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( | 60 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( |
54 thread_safe_sender_.get()); | 61 thread_safe_sender_.get()); |
55 } | 62 } |
56 | 63 |
57 } // namespace content | 64 } // namespace content |
OLD | NEW |