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

Side by Side Diff: content/browser/bluetooth/bluetooth_dispatcher_host.cc

Issue 1427653003: bluetooth: Implement TxPower and RSSI of BluetoothAdvertisementData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Change PowerValueAdapter to int8_t Created 5 years, 1 month 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
« no previous file with comments | « no previous file | content/common/bluetooth/bluetooth_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // ID Not In Map Note: 5 // ID Not In Map Note:
6 // A service, characteristic, or descriptor ID not in the corresponding 6 // A service, characteristic, or descriptor ID not in the corresponding
7 // BluetoothDispatcherHost map [service_to_device_, characteristic_to_service_, 7 // BluetoothDispatcherHost map [service_to_device_, characteristic_to_service_,
8 // descriptor_to_characteristic_] implies a hostile renderer because a renderer 8 // descriptor_to_characteristic_] implies a hostile renderer because a renderer
9 // obtains the corresponding ID from this class and it will be added to the map 9 // obtains the corresponding ID from this class and it will be added to the map
10 // at that time. 10 // at that time.
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 request_device_sessions_.Remove(chooser_id); 894 request_device_sessions_.Remove(chooser_id);
895 return; 895 return;
896 } 896 }
897 897
898 VLOG(1) << "Device: " << device->GetName(); 898 VLOG(1) << "Device: " << device->GetName();
899 VLOG(1) << "UUIDs: "; 899 VLOG(1) << "UUIDs: ";
900 for (BluetoothUUID uuid : device->GetUUIDs()) 900 for (BluetoothUUID uuid : device->GetUUIDs())
901 VLOG(1) << "\t" << uuid.canonical_value(); 901 VLOG(1) << "\t" << uuid.canonical_value();
902 902
903 content::BluetoothDevice device_ipc( 903 content::BluetoothDevice device_ipc(
904 device->GetAddress(), // id 904 device->GetAddress(), // id
905 device->GetName(), // name 905 device->GetName(), // name
906 device->GetBluetoothClass(), // device_class 906 content::BluetoothDevice::ValidatePower(
907 device->GetVendorIDSource(), // vendor_id_source 907 device->GetInquiryTxPower()), // tx_power
908 device->GetVendorID(), // vendor_id 908 content::BluetoothDevice::ValidatePower(
909 device->GetProductID(), // product_id 909 device->GetInquiryRSSI()), // rssi
910 device->GetDeviceID(), // product_version 910 device->GetBluetoothClass(), // device_class
911 device->IsPaired(), // paired 911 device->GetVendorIDSource(), // vendor_id_source
912 device->GetVendorID(), // vendor_id
913 device->GetProductID(), // product_id
914 device->GetDeviceID(), // product_version
915 device->IsPaired(), // paired
912 content::BluetoothDevice::UUIDsFromBluetoothUUIDs( 916 content::BluetoothDevice::UUIDsFromBluetoothUUIDs(
913 device->GetUUIDs())); // uuids 917 device->GetUUIDs())); // uuids
914 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS); 918 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS);
915 Send(new BluetoothMsg_RequestDeviceSuccess(session->thread_id, 919 Send(new BluetoothMsg_RequestDeviceSuccess(session->thread_id,
916 session->request_id, device_ipc)); 920 session->request_id, device_ipc));
917 request_device_sessions_.Remove(chooser_id); 921 request_device_sessions_.Remove(chooser_id);
918 } 922 }
919 923
920 void BluetoothDispatcherHost::OnGATTConnectionCreated( 924 void BluetoothDispatcherHost::OnGATTConnectionCreated(
921 int thread_id, 925 int thread_id,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1142 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1139 NOTIMPLEMENTED(); 1143 NOTIMPLEMENTED();
1140 } 1144 }
1141 1145
1142 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() { 1146 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() {
1143 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1147 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1144 NOTIMPLEMENTED(); 1148 NOTIMPLEMENTED();
1145 } 1149 }
1146 1150
1147 } // namespace content 1151 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698