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

Side by Side Diff: content/renderer/bluetooth/bluetooth_dispatcher.cc

Issue 1564953003: bluetooth: Remove BluetoothDevice.paired (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/bluetooth/bluetooth_dispatcher.h" 5 #include "content/renderer/bluetooth/bluetooth_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 549
550 WebVector<WebString> uuids(device.uuids.size()); 550 WebVector<WebString> uuids(device.uuids.size());
551 for (size_t i = 0; i < device.uuids.size(); ++i) 551 for (size_t i = 0; i < device.uuids.size(); ++i)
552 uuids[i] = WebString::fromUTF8(device.uuids[i].c_str()); 552 uuids[i] = WebString::fromUTF8(device.uuids[i].c_str());
553 553
554 pending_requests_.Lookup(request_id) 554 pending_requests_.Lookup(request_id)
555 ->onSuccess(blink::adoptWebPtr(new WebBluetoothDevice( 555 ->onSuccess(blink::adoptWebPtr(new WebBluetoothDevice(
556 WebString::fromUTF8(device.id), WebString(device.name), 556 WebString::fromUTF8(device.id), WebString(device.name),
557 device.tx_power, device.rssi, device.device_class, 557 device.tx_power, device.rssi, device.device_class,
558 GetWebVendorIdSource(device.vendor_id_source), device.vendor_id, 558 GetWebVendorIdSource(device.vendor_id_source), device.vendor_id,
559 device.product_id, device.product_version, device.paired, uuids))); 559 device.product_id, device.product_version, uuids)));
560 pending_requests_.Remove(request_id); 560 pending_requests_.Remove(request_id);
561 } 561 }
562 562
563 void BluetoothDispatcher::OnRequestDeviceError(int thread_id, 563 void BluetoothDispatcher::OnRequestDeviceError(int thread_id,
564 int request_id, 564 int request_id,
565 WebBluetoothError error) { 565 WebBluetoothError error) {
566 DCHECK(pending_requests_.Lookup(request_id)) << request_id; 566 DCHECK(pending_requests_.Lookup(request_id)) << request_id;
567 pending_requests_.Lookup(request_id)->onError(WebBluetoothError(error)); 567 pending_requests_.Lookup(request_id)->onError(WebBluetoothError(error));
568 pending_requests_.Remove(request_id); 568 pending_requests_.Remove(request_id);
569 } 569 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 int thread_id, 762 int thread_id,
763 const std::string& characteristic_instance_id, 763 const std::string& characteristic_instance_id,
764 const std::vector<uint8_t> new_value) { 764 const std::vector<uint8_t> new_value) {
765 auto active_iter = active_characteristics_.find(characteristic_instance_id); 765 auto active_iter = active_characteristics_.find(characteristic_instance_id);
766 if (active_iter != active_characteristics_.end()) { 766 if (active_iter != active_characteristics_.end()) {
767 active_iter->second->dispatchCharacteristicValueChanged(new_value); 767 active_iter->second->dispatchCharacteristicValueChanged(new_value);
768 } 768 }
769 } 769 }
770 770
771 } // namespace content 771 } // namespace content
OLDNEW
« no previous file with comments | « content/common/bluetooth/bluetooth_messages.h ('k') | third_party/WebKit/LayoutTests/bluetooth/idl-BluetoothDevice.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698