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

Unified Diff: content/renderer/bluetooth/bluetooth_dispatcher.cc

Issue 1902153003: bluetooth: Move connect/disconnect to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-connection-tests
Patch Set: Fix gypi Created 4 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
« no previous file with comments | « content/renderer/bluetooth/bluetooth_dispatcher.h ('k') | content/renderer/bluetooth/web_bluetooth_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/bluetooth/bluetooth_dispatcher.cc
diff --git a/content/renderer/bluetooth/bluetooth_dispatcher.cc b/content/renderer/bluetooth/bluetooth_dispatcher.cc
index 418acd3cc3b0bcc9edb090219460baa6a87d1406..ea91e5c133121634b7ebafb8f6205f701d035ba7 100644
--- a/content/renderer/bluetooth/bluetooth_dispatcher.cc
+++ b/content/renderer/bluetooth/bluetooth_dispatcher.cc
@@ -23,7 +23,6 @@
using blink::WebBluetoothDevice;
using blink::WebBluetoothError;
-using blink::WebBluetoothRemoteGATTServerConnectCallbacks;
using blink::WebBluetoothRemoteGATTService;
using blink::WebBluetoothReadValueCallbacks;
using blink::WebBluetoothRequestDeviceCallbacks;
@@ -81,10 +80,6 @@ void BluetoothDispatcher::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(BluetoothMsg_RequestDeviceSuccess,
OnRequestDeviceSuccess);
IPC_MESSAGE_HANDLER(BluetoothMsg_RequestDeviceError, OnRequestDeviceError);
- IPC_MESSAGE_HANDLER(BluetoothMsg_GATTServerConnectSuccess,
- OnGATTServerConnectSuccess);
- IPC_MESSAGE_HANDLER(BluetoothMsg_GATTServerConnectError,
- OnGATTServerConnectError);
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
DCHECK(handled) << "Unhandled message:" << msg.type();
@@ -119,21 +114,6 @@ void BluetoothDispatcher::requestDevice(
optional_services));
}
-void BluetoothDispatcher::connect(
- int frame_routing_id,
- const blink::WebString& device_id,
- blink::WebBluetoothRemoteGATTServerConnectCallbacks* callbacks) {
- int request_id = pending_connect_requests_.Add(callbacks);
- Send(new BluetoothHostMsg_GATTServerConnect(
- CurrentWorkerId(), request_id, frame_routing_id, device_id.utf8()));
-}
-
-void BluetoothDispatcher::disconnect(int frame_routing_id,
- const blink::WebString& device_id) {
- Send(new BluetoothHostMsg_GATTServerDisconnect(
- CurrentWorkerId(), frame_routing_id, device_id.utf8()));
-}
-
void BluetoothDispatcher::WillStopCurrentWorkerThread() {
delete this;
}
@@ -163,20 +143,4 @@ void BluetoothDispatcher::OnRequestDeviceError(int thread_id,
pending_requests_.Remove(request_id);
}
-void BluetoothDispatcher::OnGATTServerConnectSuccess(int thread_id,
- int request_id) {
- DCHECK(pending_connect_requests_.Lookup(request_id)) << request_id;
- pending_connect_requests_.Lookup(request_id)->onSuccess();
- pending_connect_requests_.Remove(request_id);
-}
-
-void BluetoothDispatcher::OnGATTServerConnectError(int thread_id,
- int request_id,
- WebBluetoothError error) {
- DCHECK(pending_connect_requests_.Lookup(request_id)) << request_id;
- pending_connect_requests_.Lookup(request_id)
- ->onError(WebBluetoothError(error));
- pending_connect_requests_.Remove(request_id);
-}
-
} // namespace content
« no previous file with comments | « content/renderer/bluetooth/bluetooth_dispatcher.h ('k') | content/renderer/bluetooth/web_bluetooth_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698