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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1068 filters, optional_services_blacklist_filtered); | 1068 filters, optional_services_blacklist_filtered); |
1069 int chooser_id = request_device_sessions_.Add(session); | 1069 int chooser_id = request_device_sessions_.Add(session); |
1070 | 1070 |
1071 BluetoothChooser::EventHandler chooser_event_handler = | 1071 BluetoothChooser::EventHandler chooser_event_handler = |
1072 base::Bind(&BluetoothDispatcherHost::OnBluetoothChooserEvent, | 1072 base::Bind(&BluetoothDispatcherHost::OnBluetoothChooserEvent, |
1073 weak_ptr_on_ui_thread_, chooser_id); | 1073 weak_ptr_on_ui_thread_, chooser_id); |
1074 if (WebContents* web_contents = | 1074 if (WebContents* web_contents = |
1075 WebContents::FromRenderFrameHost(render_frame_host)) { | 1075 WebContents::FromRenderFrameHost(render_frame_host)) { |
1076 if (WebContentsDelegate* delegate = web_contents->GetDelegate()) { | 1076 if (WebContentsDelegate* delegate = web_contents->GetDelegate()) { |
1077 session->chooser = delegate->RunBluetoothChooser( | 1077 session->chooser = delegate->RunBluetoothChooser( |
1078 web_contents, chooser_event_handler, | 1078 render_frame_host, chooser_event_handler, |
1079 render_frame_host->GetLastCommittedOrigin()); | 1079 render_frame_host->GetLastCommittedOrigin()); |
jam
2016/02/17 01:54:16
no need to give this last parameter since the call
Jeffrey Yasskin
2016/02/17 17:51:36
Oops, you're totally right. I've removed it. Thank
| |
1080 } | 1080 } |
1081 } | 1081 } |
1082 if (!session->chooser) { | 1082 if (!session->chooser) { |
1083 LOG(WARNING) | 1083 LOG(WARNING) |
1084 << "No Bluetooth chooser implementation; falling back to first device."; | 1084 << "No Bluetooth chooser implementation; falling back to first device."; |
1085 session->chooser.reset( | 1085 session->chooser.reset( |
1086 new FirstDeviceBluetoothChooser(chooser_event_handler)); | 1086 new FirstDeviceBluetoothChooser(chooser_event_handler)); |
1087 } | 1087 } |
1088 | 1088 |
1089 if (!session->chooser->CanAskForScanningPermission()) { | 1089 if (!session->chooser->CanAskForScanningPermission()) { |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1515 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1515 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1516 NOTIMPLEMENTED(); | 1516 NOTIMPLEMENTED(); |
1517 } | 1517 } |
1518 | 1518 |
1519 void BluetoothDispatcherHost::ShowNeedLocationLink() { | 1519 void BluetoothDispatcherHost::ShowNeedLocationLink() { |
1520 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1520 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1521 NOTIMPLEMENTED(); | 1521 NOTIMPLEMENTED(); |
1522 } | 1522 } |
1523 | 1523 |
1524 } // namespace content | 1524 } // namespace content |
OLD | NEW |