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

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

Issue 1865613002: bluetooth: Move read value to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-notifications
Patch Set: Address jyasskin's comments 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 70102b0a75938a947819c3c9064274ad4d346a3d..6e967c36ba2868d0ec6e90e66b24c5f5fcab10a8 100644
--- a/content/renderer/bluetooth/bluetooth_dispatcher.cc
+++ b/content/renderer/bluetooth/bluetooth_dispatcher.cc
@@ -155,10 +155,6 @@ void BluetoothDispatcher::OnMessageReceived(const IPC::Message& msg) {
OnGetCharacteristicsSuccess);
IPC_MESSAGE_HANDLER(BluetoothMsg_GetCharacteristicsError,
OnGetCharacteristicsError);
- IPC_MESSAGE_HANDLER(BluetoothMsg_ReadCharacteristicValueSuccess,
- OnReadValueSuccess);
- IPC_MESSAGE_HANDLER(BluetoothMsg_ReadCharacteristicValueError,
- OnReadValueError);
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
DCHECK(handled) << "Unhandled message:" << msg.type();
@@ -245,16 +241,6 @@ void BluetoothDispatcher::getCharacteristics(
service_instance_id.utf8(), characteristics_uuid.utf8()));
}
-void BluetoothDispatcher::readValue(
- int frame_routing_id,
- const blink::WebString& characteristic_instance_id,
- blink::WebBluetoothReadValueCallbacks* callbacks) {
- int request_id = pending_read_value_requests_.Add(callbacks);
- Send(new BluetoothHostMsg_ReadValue(CurrentWorkerId(), request_id,
- frame_routing_id,
- characteristic_instance_id.utf8()));
-}
-
void BluetoothDispatcher::WillStopCurrentWorkerThread() {
delete this;
}
@@ -395,28 +381,4 @@ void BluetoothDispatcher::OnGetCharacteristicsError(int thread_id,
pending_characteristics_requests_.Remove(request_id);
}
-void BluetoothDispatcher::OnReadValueSuccess(
- int thread_id,
- int request_id,
- const std::vector<uint8_t>& value) {
- DCHECK(pending_read_value_requests_.Lookup(request_id)) << request_id;
-
- // WebArrayBuffer is not accessible from Source/modules so we pass a
- // WebVector instead.
- pending_read_value_requests_.Lookup(request_id)->onSuccess(value);
-
- pending_read_value_requests_.Remove(request_id);
-}
-
-void BluetoothDispatcher::OnReadValueError(int thread_id,
- int request_id,
- WebBluetoothError error) {
- DCHECK(pending_read_value_requests_.Lookup(request_id)) << request_id;
-
- pending_read_value_requests_.Lookup(request_id)
- ->onError(WebBluetoothError(error));
-
- pending_read_value_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