| 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "build/build_config.h" |
| 10 #include "device/bluetooth/bluetooth_adapter.h" | 11 #include "device/bluetooth/bluetooth_adapter.h" |
| 11 #include "device/bluetooth/bluetooth_export.h" | 12 #include "device/bluetooth/bluetooth_export.h" |
| 12 | 13 |
| 13 namespace device { | 14 namespace device { |
| 14 | 15 |
| 15 // A factory class for building a Bluetooth adapter on platforms where Bluetooth | 16 // A factory class for building a Bluetooth adapter on platforms where Bluetooth |
| 16 // is available. | 17 // is available. |
| 17 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterFactory { | 18 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterFactory { |
| 18 public: | 19 public: |
| 19 typedef base::Callback<void(scoped_refptr<BluetoothAdapter> adapter)> | 20 typedef base::Callback<void(scoped_refptr<BluetoothAdapter> adapter)> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 static void SetAdapterForTesting(scoped_refptr<BluetoothAdapter> adapter); | 42 static void SetAdapterForTesting(scoped_refptr<BluetoothAdapter> adapter); |
| 42 | 43 |
| 43 // Returns true iff the implementation has a (non-NULL) shared instance of the | 44 // Returns true iff the implementation has a (non-NULL) shared instance of the |
| 44 // adapter. Exposed for testing. | 45 // adapter. Exposed for testing. |
| 45 static bool HasSharedInstanceForTesting(); | 46 static bool HasSharedInstanceForTesting(); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 } // namespace device | 49 } // namespace device |
| 49 | 50 |
| 50 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ | 51 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ |
| OLD | NEW |