| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "device/bluetooth/bluetooth_adapter.h" | 5 #include "device/bluetooth/bluetooth_adapter.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void BluetoothAdapter::RemoveObserver(BluetoothAdapter::Observer* observer) { | 53 void BluetoothAdapter::RemoveObserver(BluetoothAdapter::Observer* observer) { |
| 54 DCHECK(observer); | 54 DCHECK(observer); |
| 55 observers_.RemoveObserver(observer); | 55 observers_.RemoveObserver(observer); |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool BluetoothAdapter::HasObserver(BluetoothAdapter::Observer* observer) { | 58 bool BluetoothAdapter::HasObserver(BluetoothAdapter::Observer* observer) { |
| 59 DCHECK(observer); | 59 DCHECK(observer); |
| 60 return observers_.HasObserver(observer); | 60 return observers_.HasObserver(observer); |
| 61 } | 61 } |
| 62 | 62 |
| 63 std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet> |
| 64 BluetoothAdapter::RetrieveGattConnectedDevicesWithDiscoveryFilter( |
| 65 const BluetoothDiscoveryFilter& discovery_filter) { |
| 66 return std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet>(); |
| 67 } |
| 68 |
| 63 void BluetoothAdapter::StartDiscoverySession( | 69 void BluetoothAdapter::StartDiscoverySession( |
| 64 const DiscoverySessionCallback& callback, | 70 const DiscoverySessionCallback& callback, |
| 65 const ErrorCallback& error_callback) { | 71 const ErrorCallback& error_callback) { |
| 66 StartDiscoverySessionWithFilter(nullptr, callback, error_callback); | 72 StartDiscoverySessionWithFilter(nullptr, callback, error_callback); |
| 67 } | 73 } |
| 68 | 74 |
| 69 void BluetoothAdapter::StartDiscoverySessionWithFilter( | 75 void BluetoothAdapter::StartDiscoverySessionWithFilter( |
| 70 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, | 76 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, |
| 71 const DiscoverySessionCallback& callback, | 77 const DiscoverySessionCallback& callback, |
| 72 const ErrorCallback& error_callback) { | 78 const ErrorCallback& error_callback) { |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 UMA_HISTOGRAM_ENUMERATION( | 423 UMA_HISTOGRAM_ENUMERATION( |
| 418 "Bluetooth.DiscoverySession.Stop.Outcome", static_cast<int>(outcome), | 424 "Bluetooth.DiscoverySession.Stop.Outcome", static_cast<int>(outcome), |
| 419 static_cast<int>(UMABluetoothDiscoverySessionOutcome::COUNT)); | 425 static_cast<int>(UMABluetoothDiscoverySessionOutcome::COUNT)); |
| 420 } | 426 } |
| 421 | 427 |
| 422 // static | 428 // static |
| 423 const base::TimeDelta BluetoothAdapter::timeoutSec = | 429 const base::TimeDelta BluetoothAdapter::timeoutSec = |
| 424 base::TimeDelta::FromSeconds(180); | 430 base::TimeDelta::FromSeconds(180); |
| 425 | 431 |
| 426 } // namespace device | 432 } // namespace device |
| OLD | NEW |