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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.h

Issue 1232613004: The first 3 BluetoothTest.* unit tests now running on Mac as well. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movCBCM
Patch Set: comment edit Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/BUILD.gn ('k') | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_mac.h
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h
index d85c9b1eabd5a19c365899506c55d0a94dd99d57..2a5c1191f0ff235664afa5e2b1aa31d318f14dd4 100644
--- a/device/bluetooth/bluetooth_adapter_mac.h
+++ b/device/bluetooth/bluetooth_adapter_mac.h
@@ -41,7 +41,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
public BluetoothDiscoveryManagerMac::Observer,
public BluetoothLowEnergyDiscoveryManagerMac::Observer {
public:
- static base::WeakPtr<BluetoothAdapter> CreateAdapter();
+ static base::WeakPtr<BluetoothAdapterMac> CreateAdapter();
+ static base::WeakPtr<BluetoothAdapterMac> CreateAdapterForTest(
+ std::string name,
+ std::string address,
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
// BluetoothAdapter overrides:
std::string GetAddress() const override;
@@ -92,6 +96,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
// (crbug.com/506287).
static bool IsLowEnergyAvailable();
+ // Resets |low_energy_central_manager_| to |central_manager| and sets
+ // |low_energy_central_manager_delegate_| as the manager's delegate. Should
+ // be called only when |IsLowEnergyAvailable()|.
+ void SetCentralManagerForTesting(CBCentralManager* central_manager);
+
protected:
// BluetoothAdapter override:
void RemovePairingDelegateInternal(
@@ -148,15 +157,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
// observers.
void AddPairedDevices();
- // Private method for testing. Resets |low_energy_central_manager_| to
- // |central_manager| and sets |low_energy_central_manager_delegate_| as its
- // delegate. Should be called only when CoreBluetooth is available.
- void SetCentralManagerForTesting(CBCentralManager* central_manager);
-
std::string address_;
std::string name_;
- bool powered_;
-
+ bool classic_powered_;
int num_discovery_sessions_;
// Discovery manager for Bluetooth Classic.
« no previous file with comments | « device/BUILD.gn ('k') | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698