Chromium Code Reviews| Index: content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| index 2af1e89f35adf594085f727af85d16e1efae807f..5dec0d289d51f597de1563aa6a8c7a07069c266a 100644 |
| --- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| +++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| @@ -36,6 +36,7 @@ bool BluetoothDispatcherHost::OnMessageReceived(const IPC::Message& message) { |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(BluetoothDispatcherHost, message) |
| IPC_MESSAGE_HANDLER(BluetoothHostMsg_RequestDevice, OnRequestDevice) |
| + IPC_MESSAGE_HANDLER(BluetoothHostMsg_ConnectGATT, OnConnectGATT) |
| IPC_MESSAGE_HANDLER(BluetoothHostMsg_SetBluetoothMockDataSetForTesting, |
| OnSetBluetoothMockDataSetForTesting) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| @@ -139,6 +140,23 @@ void BluetoothDispatcherHost::OnRequestDeviceOnUI(int thread_id, |
| NOTREACHED(); |
| } |
| +void BluetoothDispatcherHost::OnConnectGATT(int thread_id, int request_id, |
| + std::string instance_id) { |
| + DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| + BrowserThread::PostTask(BrowserThread::UI, |
| + FROM_HERE, |
| + base::Bind( |
| + &BluetoothDispatcherHost::OnConnectGATTOnUI, |
| + this, thread_id, request_id, instance_id)); |
| +} |
| + |
| +void BluetoothDispatcherHost::OnConnectGATTOnUI(int thread_id, int request_id, |
| + std::string instance_id) { |
| + DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| + // TODO(ortuno): Add actual implementation of connectGATT. |
|
Tom Sepez
2015/04/20 15:54:00
Please CC me when you fix the TODO. I'd like to m
scheib
2015/04/20 16:50:12
Thanks Tom, good point:
Thread and request ID are
scheib
2015/04/20 16:51:21
Gio, please expand this TODO comment to clearly ca
ortuno
2015/04/20 20:09:33
Will do.
|
| + Send(new BluetoothMsg_ConnectGATTSuccess(thread_id, request_id, instance_id)); |
| +} |
| + |
| void BluetoothDispatcherHost::OnSetBluetoothMockDataSetForTesting( |
| const std::string& name) { |
| DCHECK_CURRENTLY_ON(BrowserThread::IO); |