| OLD | NEW |
| 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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 } | 1065 } |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 content::BluetoothDevice device_ipc( | 1068 content::BluetoothDevice device_ipc( |
| 1069 device_id_for_origin, // id | 1069 device_id_for_origin, // id |
| 1070 device->GetName(), // name | 1070 device->GetName(), // name |
| 1071 content::BluetoothDevice::ValidatePower( | 1071 content::BluetoothDevice::ValidatePower( |
| 1072 device->GetInquiryTxPower()), // tx_power | 1072 device->GetInquiryTxPower()), // tx_power |
| 1073 content::BluetoothDevice::ValidatePower( | 1073 content::BluetoothDevice::ValidatePower( |
| 1074 device->GetInquiryRSSI()), // rssi | 1074 device->GetInquiryRSSI()), // rssi |
| 1075 device->GetBluetoothClass(), // device_class | |
| 1076 device->GetVendorIDSource(), // vendor_id_source | |
| 1077 device->GetVendorID(), // vendor_id | |
| 1078 device->GetProductID(), // product_id | |
| 1079 device->GetDeviceID(), // product_version | |
| 1080 content::BluetoothDevice::UUIDsFromBluetoothUUIDs( | 1075 content::BluetoothDevice::UUIDsFromBluetoothUUIDs( |
| 1081 filtered_uuids)); // uuids | 1076 filtered_uuids)); // uuids |
| 1082 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS); | 1077 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS); |
| 1083 Send(new BluetoothMsg_RequestDeviceSuccess(session->thread_id, | 1078 Send(new BluetoothMsg_RequestDeviceSuccess(session->thread_id, |
| 1084 session->request_id, device_ipc)); | 1079 session->request_id, device_ipc)); |
| 1085 request_device_sessions_.Remove(chooser_id); | 1080 request_device_sessions_.Remove(chooser_id); |
| 1086 } | 1081 } |
| 1087 | 1082 |
| 1088 void BluetoothDispatcherHost::OnGATTConnectionCreated( | 1083 void BluetoothDispatcherHost::OnGATTConnectionCreated( |
| 1089 int thread_id, | 1084 int thread_id, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 const PrimaryServicesRequest& request) { | 1213 const PrimaryServicesRequest& request) { |
| 1219 pending_primary_services_requests_[device_address].push_back(request); | 1214 pending_primary_services_requests_[device_address].push_back(request); |
| 1220 } | 1215 } |
| 1221 | 1216 |
| 1222 url::Origin BluetoothDispatcherHost::GetOrigin(int frame_routing_id) { | 1217 url::Origin BluetoothDispatcherHost::GetOrigin(int frame_routing_id) { |
| 1223 return RenderFrameHostImpl::FromID(render_process_id_, frame_routing_id) | 1218 return RenderFrameHostImpl::FromID(render_process_id_, frame_routing_id) |
| 1224 ->GetLastCommittedOrigin(); | 1219 ->GetLastCommittedOrigin(); |
| 1225 } | 1220 } |
| 1226 | 1221 |
| 1227 } // namespace content | 1222 } // namespace content |
| OLD | NEW |