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::WebBluetoothStartNotificationsCallbacks* callbacks) { |
| 67 GetDispatcher()->startNotifications(characteristic_instance_id, callbacks); |
| 68 } |
| 69 |
| 70 void WebBluetoothImpl::stopNotifications( |
| 71 const blink::WebString& characteristic_instance_id, |
| 72 blink::WebBluetoothStopNotificationsCallbacks* callbacks) { |
| 73 GetDispatcher()->stopNotifications(characteristic_instance_id, callbacks); |
| 74 } |
| 75 |
64 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { | 76 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { |
65 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( | 77 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( |
66 thread_safe_sender_.get()); | 78 thread_safe_sender_.get()); |
67 } | 79 } |
68 | 80 |
69 } // namespace content | 81 } // namespace content |
OLD | NEW |