| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Gets or Creates a BluetoothDispatcher for the current thread. | 42 // Gets or Creates a BluetoothDispatcher for the current thread. |
| 43 // |thread_safe_sender| is required when constructing a BluetoothDispatcher. | 43 // |thread_safe_sender| is required when constructing a BluetoothDispatcher. |
| 44 static BluetoothDispatcher* GetOrCreateThreadSpecificInstance( | 44 static BluetoothDispatcher* GetOrCreateThreadSpecificInstance( |
| 45 ThreadSafeSender* thread_safe_sender); | 45 ThreadSafeSender* thread_safe_sender); |
| 46 | 46 |
| 47 // IPC Send and Receiving interface, see IPC::Sender and IPC::Listener. | 47 // IPC Send and Receiving interface, see IPC::Sender and IPC::Listener. |
| 48 bool Send(IPC::Message* msg); | 48 bool Send(IPC::Message* msg); |
| 49 void OnMessageReceived(const IPC::Message& msg); | 49 void OnMessageReceived(const IPC::Message& msg); |
| 50 | 50 |
| 51 // Corresponding to WebBluetoothImpl methods. | 51 // Corresponding to WebBluetoothImpl methods. |
| 52 void requestDevice(blink::WebBluetoothRequestDeviceCallbacks* callbacks); | 52 void requestDevice(const blink::WebRequestDeviceOptions& options, |
| 53 blink::WebBluetoothRequestDeviceCallbacks* callbacks); |
| 53 void connectGATT(const blink::WebString& device_instance_id, | 54 void connectGATT(const blink::WebString& device_instance_id, |
| 54 blink::WebBluetoothConnectGATTCallbacks* callbacks); | 55 blink::WebBluetoothConnectGATTCallbacks* callbacks); |
| 55 void getPrimaryService( | 56 void getPrimaryService( |
| 56 const blink::WebString& device_instance_id, | 57 const blink::WebString& device_instance_id, |
| 57 const blink::WebString& service_uuid, | 58 const blink::WebString& service_uuid, |
| 58 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks); | 59 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks); |
| 59 | 60 |
| 60 // WorkerTaskRunner::Observer implementation. | 61 // WorkerTaskRunner::Observer implementation. |
| 61 void OnWorkerRunLoopStopped() override; | 62 void OnWorkerRunLoopStopped() override; |
| 62 | 63 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Owns request objects. | 98 // Owns request objects. |
| 98 IDMap<BluetoothPrimaryServiceRequest, IDMapOwnPointer> | 99 IDMap<BluetoothPrimaryServiceRequest, IDMapOwnPointer> |
| 99 pending_primary_service_requests_; | 100 pending_primary_service_requests_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher); | 102 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace content | 105 } // namespace content |
| 105 | 106 |
| 106 #endif // CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ | 107 #endif // CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ |
| OLD | NEW |