| 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..9cf6967c4d743d8fb9a053717b4d0a07b5fe14a1 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,29 @@ void BluetoothDispatcherHost::OnRequestDeviceOnUI(int thread_id,
|
| NOTREACHED();
|
| }
|
|
|
| +void BluetoothDispatcherHost::OnConnectGATT(
|
| + int thread_id,
|
| + int request_id,
|
| + const std::string& device_instance_id) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| + BrowserThread::PostTask(BrowserThread::UI,
|
| + FROM_HERE,
|
| + base::Bind(
|
| + &BluetoothDispatcherHost::OnConnectGATTOnUI,
|
| + this, thread_id, request_id, device_instance_id));
|
| +}
|
| +
|
| +void BluetoothDispatcherHost::OnConnectGATTOnUI(
|
| + int thread_id,
|
| + int request_id,
|
| + const std::string& device_instance_id) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| + // TODO(ortuno): Add actual implementation of connectGATT. This needs to be
|
| + // done after the "allowed devices map" is implemented.
|
| + Send(new BluetoothMsg_ConnectGATTSuccess(thread_id, request_id,
|
| + device_instance_id));
|
| +}
|
| +
|
| void BluetoothDispatcherHost::OnSetBluetoothMockDataSetForTesting(
|
| const std::string& name) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
|