| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
| 7 | 7 |
| 8 #include <IOKit/IOReturn.h> | 8 #include <IOKit/IOReturn.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
| 14 #include "base/mac/scoped_nsobject.h" | 14 #include "base/mac/scoped_nsobject.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 18 #include "device/bluetooth/bluetooth_adapter.h" | 18 #include "device/bluetooth/bluetooth_adapter.h" |
| 19 #include "device/bluetooth/bluetooth_discovery_manager_mac.h" | 19 #include "device/bluetooth/bluetooth_discovery_manager_mac.h" |
| 20 #include "device/bluetooth/bluetooth_export.h" | |
| 21 | 20 |
| 22 @class IOBluetoothDevice; | 21 @class IOBluetoothDevice; |
| 23 @class NSArray; | 22 @class NSArray; |
| 24 @class NSDate; | 23 @class NSDate; |
| 25 | 24 |
| 26 namespace base { | 25 namespace base { |
| 27 | 26 |
| 28 class SequencedTaskRunner; | 27 class SequencedTaskRunner; |
| 29 | 28 |
| 30 } // namespace base | 29 } // namespace base |
| 31 | 30 |
| 32 namespace device { | 31 namespace device { |
| 33 | 32 |
| 34 class BluetoothAdapterMacTest; | 33 class BluetoothAdapterMacTest; |
| 35 | 34 |
| 36 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac | 35 class BluetoothAdapterMac : public BluetoothAdapter, |
| 37 : public BluetoothAdapter, | 36 public BluetoothDiscoveryManagerMac::Observer { |
| 38 public BluetoothDiscoveryManagerMac::Observer { | |
| 39 public: | 37 public: |
| 40 static base::WeakPtr<BluetoothAdapter> CreateAdapter(); | 38 static base::WeakPtr<BluetoothAdapter> CreateAdapter(); |
| 41 | 39 |
| 42 // BluetoothAdapter: | 40 // BluetoothAdapter: |
| 43 void AddObserver(BluetoothAdapter::Observer* observer) override; | 41 void AddObserver(BluetoothAdapter::Observer* observer) override; |
| 44 void RemoveObserver(BluetoothAdapter::Observer* observer) override; | 42 void RemoveObserver(BluetoothAdapter::Observer* observer) override; |
| 45 std::string GetAddress() const override; | 43 std::string GetAddress() const override; |
| 46 std::string GetName() const override; | 44 std::string GetName() const override; |
| 47 void SetName(const std::string& name, | 45 void SetName(const std::string& name, |
| 48 const base::Closure& callback, | 46 const base::Closure& callback, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 ObserverList<BluetoothAdapter::Observer> observers_; | 119 ObserverList<BluetoothAdapter::Observer> observers_; |
| 122 | 120 |
| 123 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; | 121 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
| 124 | 122 |
| 125 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); | 123 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |
| 126 }; | 124 }; |
| 127 | 125 |
| 128 } // namespace device | 126 } // namespace device |
| 129 | 127 |
| 130 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 128 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
| OLD | NEW |