Chromium Code Reviews| Index: chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h |
| diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h b/chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5cbb506325245a941ed334186308acc692ebcf35 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ |
| +#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/memory/ref_counted.h" |
| + |
| +namespace chromeos { |
| + |
| +class BluetoothAdapter; |
| + |
| +// BluetoothAdapterFactory is a class that contains static methods, which |
| +// instantiate either a specific bluetooth adapter, or for the generic "default |
|
bryeung
2012/09/19 13:27:16
s/for//
youngki
2012/09/19 19:35:23
Done.
|
| +// adapter" which may change depending on availability. |
| +class BluetoothAdapterFactory { |
| + public: |
| + // Returns the shared instance for the default adapter, whichever that may |
| + // be at the time. Use IsPresent() and the AdapterPresentChanged() observer |
| + // method to determine whether an adapter is actually available or not. |
| + static scoped_refptr<BluetoothAdapter> DefaultAdapter(); |
| + |
| + // Creates an instance for a specific adapter named by |address|, which |
|
bryeung
2012/09/19 13:27:16
Instead of "named by ..." maybe "at address |addr
youngki
2012/09/19 19:35:23
Done.
|
| + // may be the bluetooth address of the adapter. |
| + static BluetoothAdapter* Create(const std::string& address); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ |