| 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_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ |
| 6 #define CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ | 6 #define CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/child/worker_task_runner.h" | 10 #include "content/child/worker_task_runner.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Gets or Creates a BluetoothDispatcher for the current thread. | 43 // Gets or Creates a BluetoothDispatcher for the current thread. |
| 44 // |thread_safe_sender| is required when constructing a BluetoothDispatcher. | 44 // |thread_safe_sender| is required when constructing a BluetoothDispatcher. |
| 45 static BluetoothDispatcher* GetOrCreateThreadSpecificInstance( | 45 static BluetoothDispatcher* GetOrCreateThreadSpecificInstance( |
| 46 ThreadSafeSender* thread_safe_sender); | 46 ThreadSafeSender* thread_safe_sender); |
| 47 | 47 |
| 48 // IPC Send and Receiving interface, see IPC::Sender and IPC::Listener. | 48 // IPC Send and Receiving interface, see IPC::Sender and IPC::Listener. |
| 49 bool Send(IPC::Message* msg); | 49 bool Send(IPC::Message* msg); |
| 50 void OnMessageReceived(const IPC::Message& msg); | 50 void OnMessageReceived(const IPC::Message& msg); |
| 51 | 51 |
| 52 // Corresponding to WebBluetoothImpl methods. | 52 // Corresponding to WebBluetoothImpl methods. |
| 53 void requestDevice(blink::WebBluetoothRequestDeviceCallbacks* callbacks); | 53 void requestDevice(const blink::WebRequestDeviceOptions& options, |
| 54 blink::WebBluetoothRequestDeviceCallbacks* callbacks); |
| 54 void connectGATT(const blink::WebString& device_instance_id, | 55 void connectGATT(const blink::WebString& device_instance_id, |
| 55 blink::WebBluetoothConnectGATTCallbacks* callbacks); | 56 blink::WebBluetoothConnectGATTCallbacks* callbacks); |
| 56 void getPrimaryService( | 57 void getPrimaryService( |
| 57 const blink::WebString& device_instance_id, | 58 const blink::WebString& device_instance_id, |
| 58 const blink::WebString& service_uuid, | 59 const blink::WebString& service_uuid, |
| 59 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks); | 60 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks); |
| 60 | 61 |
| 61 void getCharacteristic( | 62 void getCharacteristic( |
| 62 const blink::WebString& service_instance_id, | 63 const blink::WebString& service_instance_id, |
| 63 const blink::WebString& characteristic_uuid, | 64 const blink::WebString& characteristic_uuid, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Tracks requests to read from a characteristics. | 130 // Tracks requests to read from a characteristics. |
| 130 IDMap<blink::WebBluetoothReadValueCallbacks, IDMapOwnPointer> | 131 IDMap<blink::WebBluetoothReadValueCallbacks, IDMapOwnPointer> |
| 131 pending_read_value_requests_; | 132 pending_read_value_requests_; |
| 132 | 133 |
| 133 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher); | 134 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher); |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 } // namespace content | 137 } // namespace content |
| 137 | 138 |
| 138 #endif // CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ | 139 #endif // CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ |
| OLD | NEW |