diff options
author | youngki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-02 01:56:45 +0000 |
---|---|---|
committer | youngki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-02 01:56:45 +0000 |
commit | cc1bc719c2fd37e710a5cdf55f4559801b98d9ba (patch) | |
tree | 49fd64a8674e54904d886546acfce2f7b636d980 /chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h | |
parent | ac22933cf0a514c841856e6274df8f2000ae8203 (diff) | |
download | chromium_src-cc1bc719c2fd37e710a5cdf55f4559801b98d9ba.zip chromium_src-cc1bc719c2fd37e710a5cdf55f4559801b98d9ba.tar.gz chromium_src-cc1bc719c2fd37e710a5cdf55f4559801b98d9ba.tar.bz2 |
Renames the classes in chrome/browser/chromeos/bluetooth/ ChromeOs-specific (i.e. BluetoothAdapter => BluetoothAdapterChromeOs) and creating interfaces: BluetoothAdapter and BluetoothDevice.
This CL does the Step 1 & 2 of:
1) Renames the classes in chrome/browser/chromeos/bluetooth/ chromeos-specific
(i.e. BluetoothAdapter => BluetoothAdapterChromeOs)
2) Create interfaces of the classes in chrome/browser/chromeos/bluetooth/.
These interfaces will be used in the platform-independent logics.
3) Move everything out of chrome/browser/chromeos/bluetooth/ into
devices/bluetooth/ since the code is no longer specific to linux/chromeos.
4) Add Windows implementations. (i.e. Create BluetoothAdapterWindows)
BUG=135470
Review URL: https://chromiumcodereview.appspot.com/10899037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h')
-rw-r--r-- | chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h | 32 |
1 files changed, 32 insertions, 0 deletions
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 0000000..0cd4b24 --- /dev/null +++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h @@ -0,0 +1,32 @@ +// 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 the generic "default +// 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 at address |address|. + static BluetoothAdapter* Create(const std::string& address); +}; + +} // namespace chromeos + +#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ |