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

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

Issue 2921233002: Revert of bluetooth: Implement simulateGATTConnectionResponse() (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | device/bluetooth/public/interfaces/test/fake_bluetooth.mojom » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/browser/bluetooth/bluetooth_device_chooser_controller.h" 5 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <unordered_set> 9 #include <unordered_set>
10 10
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 RecordRSSISignalStrengthLevel(content::UMARSSISignalStrengthLevel::LEVEL_4); 484 RecordRSSISignalStrengthLevel(content::UMARSSISignalStrengthLevel::LEVEL_4);
485 return 4; 485 return 4;
486 } 486 }
487 } 487 }
488 488
489 void BluetoothDeviceChooserController::SetTestScanDurationForTesting() { 489 void BluetoothDeviceChooserController::SetTestScanDurationForTesting() {
490 BluetoothDeviceChooserController::use_test_scan_duration_ = true; 490 BluetoothDeviceChooserController::use_test_scan_duration_ = true;
491 } 491 }
492 492
493 void BluetoothDeviceChooserController::PopulateConnectedDevices() { 493 void BluetoothDeviceChooserController::PopulateConnectedDevices() {
494 // TODO(crbug.com/728897): Use RetrieveGattConnectedDevices once implemented.
495 for (const device::BluetoothDevice* device : adapter_->GetDevices()) { 494 for (const device::BluetoothDevice* device : adapter_->GetDevices()) {
496 if (device->IsGattConnected()) { 495 if (device->IsGattConnected()) {
497 AddFilteredDevice(*device); 496 AddFilteredDevice(*device);
498 } 497 }
499 } 498 }
500 } 499 }
501 500
502 void BluetoothDeviceChooserController::StartDeviceDiscovery() { 501 void BluetoothDeviceChooserController::StartDeviceDiscovery() {
503 DCHECK_CURRENTLY_ON(BrowserThread::UI); 502 DCHECK_CURRENTLY_ON(BrowserThread::UI);
504 503
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 617
619 void BluetoothDeviceChooserController::PostErrorCallback( 618 void BluetoothDeviceChooserController::PostErrorCallback(
620 blink::mojom::WebBluetoothResult error) { 619 blink::mojom::WebBluetoothResult error) {
621 if (!base::ThreadTaskRunnerHandle::Get()->PostTask( 620 if (!base::ThreadTaskRunnerHandle::Get()->PostTask(
622 FROM_HERE, base::Bind(error_callback_, error))) { 621 FROM_HERE, base::Bind(error_callback_, error))) {
623 LOG(WARNING) << "No TaskRunner."; 622 LOG(WARNING) << "No TaskRunner.";
624 } 623 }
625 } 624 }
626 625
627 } // namespace content 626 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/public/interfaces/test/fake_bluetooth.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698