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" |
20 | 21 |
21 @class IOBluetoothDevice; | 22 @class IOBluetoothDevice; |
22 @class NSArray; | 23 @class NSArray; |
23 @class NSDate; | 24 @class NSDate; |
24 | 25 |
25 namespace base { | 26 namespace base { |
26 | 27 |
27 class SequencedTaskRunner; | 28 class SequencedTaskRunner; |
28 | 29 |
29 } // namespace base | 30 } // namespace base |
30 | 31 |
31 namespace device { | 32 namespace device { |
32 | 33 |
33 class BluetoothAdapterMacTest; | 34 class BluetoothAdapterMacTest; |
34 | 35 |
35 class BluetoothAdapterMac : public BluetoothAdapter, | 36 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac |
36 public BluetoothDiscoveryManagerMac::Observer { | 37 : public BluetoothAdapter, |
| 38 public BluetoothDiscoveryManagerMac::Observer { |
37 public: | 39 public: |
38 static base::WeakPtr<BluetoothAdapter> CreateAdapter(); | 40 static base::WeakPtr<BluetoothAdapter> CreateAdapter(); |
39 | 41 |
40 // BluetoothAdapter: | 42 // BluetoothAdapter: |
41 void AddObserver(BluetoothAdapter::Observer* observer) override; | 43 void AddObserver(BluetoothAdapter::Observer* observer) override; |
42 void RemoveObserver(BluetoothAdapter::Observer* observer) override; | 44 void RemoveObserver(BluetoothAdapter::Observer* observer) override; |
43 std::string GetAddress() const override; | 45 std::string GetAddress() const override; |
44 std::string GetName() const override; | 46 std::string GetName() const override; |
45 void SetName(const std::string& name, | 47 void SetName(const std::string& name, |
46 const base::Closure& callback, | 48 const base::Closure& callback, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 ObserverList<BluetoothAdapter::Observer> observers_; | 121 ObserverList<BluetoothAdapter::Observer> observers_; |
120 | 122 |
121 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; | 123 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); | 125 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace device | 128 } // namespace device |
127 | 129 |
128 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 130 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
OLD | NEW |