| Index: content/renderer/bluetooth/bluetooth_dispatcher.cc
|
| diff --git a/content/renderer/bluetooth/bluetooth_dispatcher.cc b/content/renderer/bluetooth/bluetooth_dispatcher.cc
|
| index 5c4e81bcd48e485c028caa6046b00c7efd04a1ed..a4b7b4756cb6591e7f38064b6f0f8eefd9616b92 100644
|
| --- a/content/renderer/bluetooth/bluetooth_dispatcher.cc
|
| +++ b/content/renderer/bluetooth/bluetooth_dispatcher.cc
|
| @@ -76,17 +76,6 @@ struct BluetoothCharacteristicsRequest {
|
| scoped_ptr<blink::WebBluetoothGetCharacteristicsCallbacks> callbacks;
|
| };
|
|
|
| -// Struct that holds a pending WriteValue request.
|
| -struct BluetoothWriteValueRequest {
|
| - BluetoothWriteValueRequest(const blink::WebVector<uint8_t>& value,
|
| - blink::WebBluetoothWriteValueCallbacks* callbacks)
|
| - : value(value), callbacks(callbacks) {}
|
| - ~BluetoothWriteValueRequest() {}
|
| -
|
| - const blink::WebVector<uint8_t> value;
|
| - scoped_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks;
|
| -};
|
| -
|
| // Struct that holds a pending Start/StopNotifications request.
|
| struct BluetoothNotificationsRequest {
|
| BluetoothNotificationsRequest(
|
| @@ -198,10 +187,6 @@ void BluetoothDispatcher::OnMessageReceived(const IPC::Message& msg) {
|
| OnReadValueSuccess);
|
| IPC_MESSAGE_HANDLER(BluetoothMsg_ReadCharacteristicValueError,
|
| OnReadValueError);
|
| - IPC_MESSAGE_HANDLER(BluetoothMsg_WriteCharacteristicValueSuccess,
|
| - OnWriteValueSuccess);
|
| - IPC_MESSAGE_HANDLER(BluetoothMsg_WriteCharacteristicValueError,
|
| - OnWriteValueError);
|
| IPC_MESSAGE_HANDLER(BluetoothMsg_StartNotificationsSuccess,
|
| OnStartNotificationsSuccess)
|
| IPC_MESSAGE_HANDLER(BluetoothMsg_StartNotificationsError,
|
| @@ -306,19 +291,6 @@ void BluetoothDispatcher::readValue(
|
| characteristic_instance_id.utf8()));
|
| }
|
|
|
| -void BluetoothDispatcher::writeValue(
|
| - int frame_routing_id,
|
| - const blink::WebString& characteristic_instance_id,
|
| - const blink::WebVector<uint8_t>& value,
|
| - blink::WebBluetoothWriteValueCallbacks* callbacks) {
|
| - int request_id = pending_write_value_requests_.Add(
|
| - new BluetoothWriteValueRequest(value, callbacks));
|
| - Send(new BluetoothHostMsg_WriteValue(
|
| - CurrentWorkerId(), request_id, frame_routing_id,
|
| - characteristic_instance_id.utf8(),
|
| - std::vector<uint8_t>(value.begin(), value.end())));
|
| -}
|
| -
|
| void BluetoothDispatcher::startNotifications(
|
| int frame_routing_id,
|
| const blink::WebString& characteristic_instance_id,
|
| @@ -767,28 +739,6 @@ void BluetoothDispatcher::OnReadValueError(int thread_id,
|
| pending_read_value_requests_.Remove(request_id);
|
| }
|
|
|
| -void BluetoothDispatcher::OnWriteValueSuccess(int thread_id, int request_id) {
|
| - DCHECK(pending_write_value_requests_.Lookup(request_id)) << request_id;
|
| -
|
| - BluetoothWriteValueRequest* request =
|
| - pending_write_value_requests_.Lookup(request_id);
|
| - request->callbacks->onSuccess(request->value);
|
| -
|
| - pending_write_value_requests_.Remove(request_id);
|
| -}
|
| -
|
| -void BluetoothDispatcher::OnWriteValueError(int thread_id,
|
| - int request_id,
|
| - WebBluetoothError error) {
|
| - DCHECK(pending_write_value_requests_.Lookup(request_id)) << request_id;
|
| -
|
| - BluetoothWriteValueRequest* request =
|
| - pending_write_value_requests_.Lookup(request_id);
|
| - request->callbacks->onError(WebBluetoothError(error));
|
| -
|
| - pending_write_value_requests_.Remove(request_id);
|
| -}
|
| -
|
| void BluetoothDispatcher::OnStartNotificationsSuccess(int thread_id,
|
| int request_id) {
|
| DCHECK(pending_notifications_requests_.Lookup(request_id)) << request_id;
|
|
|