| 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 29 matching lines...) Expand all Loading... |
| 40 void WebBluetoothImpl::getPrimaryService( | 40 void WebBluetoothImpl::getPrimaryService( |
| 41 const blink::WebString& device_id, | 41 const blink::WebString& device_id, |
| 42 const blink::WebString& service_uuid, | 42 const blink::WebString& service_uuid, |
| 43 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks) { | 43 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks) { |
| 44 GetDispatcher()->getPrimaryService(frame_routing_id_, device_id, service_uuid, | 44 GetDispatcher()->getPrimaryService(frame_routing_id_, device_id, service_uuid, |
| 45 callbacks); | 45 callbacks); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void WebBluetoothImpl::getCharacteristic( | 48 void WebBluetoothImpl::getCharacteristic( |
| 49 const blink::WebString& service_instance_id, | 49 const blink::WebString& service_instance_id, |
| 50 const blink::WebString& characteristic_uuid, | 50 const blink::WebString& characteristics_uuid, |
| 51 blink::WebBluetoothGetCharacteristicCallbacks* callbacks) { | 51 blink::WebBluetoothGetCharacteristicCallbacks* callbacks) { |
| 52 GetDispatcher()->getCharacteristic(frame_routing_id_, service_instance_id, | 52 GetDispatcher()->getCharacteristic(frame_routing_id_, service_instance_id, |
| 53 characteristic_uuid, callbacks); | 53 characteristics_uuid, callbacks); |
| 54 } |
| 55 |
| 56 void WebBluetoothImpl::getCharacteristics( |
| 57 const blink::WebString& service_instance_id, |
| 58 const blink::WebString& characteristic_uuid, |
| 59 blink::WebBluetoothGetCharacteristicsCallbacks* callbacks) { |
| 60 GetDispatcher()->getCharacteristics(frame_routing_id_, service_instance_id, |
| 61 characteristic_uuid, callbacks); |
| 54 } | 62 } |
| 55 | 63 |
| 56 void WebBluetoothImpl::readValue( | 64 void WebBluetoothImpl::readValue( |
| 57 const blink::WebString& characteristic_instance_id, | 65 const blink::WebString& characteristic_instance_id, |
| 58 blink::WebBluetoothReadValueCallbacks* callbacks) { | 66 blink::WebBluetoothReadValueCallbacks* callbacks) { |
| 59 GetDispatcher()->readValue(frame_routing_id_, characteristic_instance_id, | 67 GetDispatcher()->readValue(frame_routing_id_, characteristic_instance_id, |
| 60 callbacks); | 68 callbacks); |
| 61 } | 69 } |
| 62 | 70 |
| 63 void WebBluetoothImpl::writeValue( | 71 void WebBluetoothImpl::writeValue( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 GetDispatcher()->registerCharacteristicObject( | 105 GetDispatcher()->registerCharacteristicObject( |
| 98 frame_routing_id_, characteristic_instance_id, characteristic); | 106 frame_routing_id_, characteristic_instance_id, characteristic); |
| 99 } | 107 } |
| 100 | 108 |
| 101 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { | 109 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { |
| 102 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( | 110 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( |
| 103 thread_safe_sender_.get()); | 111 thread_safe_sender_.get()); |
| 104 } | 112 } |
| 105 | 113 |
| 106 } // namespace content | 114 } // namespace content |
| OLD | NEW |