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/renderer/bluetooth/web_bluetooth_impl.h" | 5 #include "content/renderer/bluetooth/web_bluetooth_impl.h" |
6 | 6 |
7 #include "content/child/thread_safe_sender.h" | 7 #include "content/child/thread_safe_sender.h" |
8 #include "content/renderer/bluetooth/bluetooth_dispatcher.h" | 8 #include "content/renderer/bluetooth/bluetooth_dispatcher.h" |
9 #include "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 GetDispatcher()->readValue(characteristic_instance_id, callbacks); | 54 GetDispatcher()->readValue(characteristic_instance_id, callbacks); |
55 } | 55 } |
56 | 56 |
57 void WebBluetoothImpl::writeValue( | 57 void WebBluetoothImpl::writeValue( |
58 const blink::WebString& characteristic_instance_id, | 58 const blink::WebString& characteristic_instance_id, |
59 const std::vector<uint8_t>& value, | 59 const std::vector<uint8_t>& value, |
60 blink::WebBluetoothWriteValueCallbacks* callbacks) { | 60 blink::WebBluetoothWriteValueCallbacks* callbacks) { |
61 GetDispatcher()->writeValue(characteristic_instance_id, value, callbacks); | 61 GetDispatcher()->writeValue(characteristic_instance_id, value, callbacks); |
62 } | 62 } |
63 | 63 |
| 64 void WebBluetoothImpl::startNotifications( |
| 65 const blink::WebString& characteristic_instance_id, |
| 66 blink::WebBluetoothGATTCharacteristic* characteristic, |
| 67 blink::WebBluetoothNotificationsCallbacks* callbacks) { |
| 68 GetDispatcher()->startNotifications(characteristic_instance_id, |
| 69 characteristic, callbacks); |
| 70 } |
| 71 |
| 72 void WebBluetoothImpl::stopNotifications( |
| 73 const blink::WebString& characteristic_instance_id, |
| 74 blink::WebBluetoothGATTCharacteristic* characteristic, |
| 75 blink::WebBluetoothNotificationsCallbacks* callbacks) { |
| 76 GetDispatcher()->stopNotifications(characteristic_instance_id, characteristic, |
| 77 callbacks); |
| 78 } |
| 79 |
| 80 void WebBluetoothImpl::characteristicObjectRemoved( |
| 81 const blink::WebString& characteristic_instance_id, |
| 82 blink::WebBluetoothGATTCharacteristic* characteristic) { |
| 83 GetDispatcher()->characteristicObjectRemoved(characteristic_instance_id, |
| 84 characteristic); |
| 85 } |
| 86 |
64 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { | 87 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { |
65 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( | 88 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( |
66 thread_safe_sender_.get()); | 89 thread_safe_sender_.get()); |
67 } | 90 } |
68 | 91 |
69 } // namespace content | 92 } // namespace content |
OLD | NEW |