Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: content/browser/bluetooth/bluetooth_dispatcher_host.cc

Issue 1082273006: bluetooth: Impl uses new WebBluetoothGATTRemoteServer content/browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698