diff options
author | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 03:32:26 +0000 |
---|---|---|
committer | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 03:32:26 +0000 |
commit | 320447d72fca8cbcd8ddef035f47e554a175a32c (patch) | |
tree | 5847508989e52d651ae1d5f92c33540aecf070ed /device/bluetooth/bluetooth_adapter_win.h | |
parent | c308f512b3dd5008cf921d575ae669e340815ddf (diff) | |
download | chromium_src-320447d72fca8cbcd8ddef035f47e554a175a32c.zip chromium_src-320447d72fca8cbcd8ddef035f47e554a175a32c.tar.gz chromium_src-320447d72fca8cbcd8ddef035f47e554a175a32c.tar.bz2 |
Bluetooth: clean up Bluetooth classes
The abstract BluetoothDevice class has a few problems inherited from
its origin as a ChromeOS-specific class split between implementation
and platform-specific components.
Clean those problems up, specifically:
- replace bluetooth_class_, name_ and address_ non-abstract members
with getter functions that the platform should implement.
- also make IsConnected(), IsConnectable() and IsConnecting()
abstract functions rather than providing an implementation
- remove IsVisible() which was a CrOS-specific hack
- remove IsBonded(), use IsPaired() instead
- remove service_uuids_ non-abstract member; make GetServices return
a copy of the list to allow implementations to fetch it on demand
BluetoothDevice retains implementations for GetName(), GetDisplayType()
and ProvidesServiceWithUUID() since those can be implemented entirely
using platform-provided information functions and would be identical
in each platform.
Also rename BluetoothAdapter::address() and BluetoothAdapter::name() to
GetAddress() and GetName() to match since they are also pure virtual.
BUG=none
TEST=device_unittests, browser_tests, unit_tests
Review URL: https://chromiumcodereview.appspot.com/13416005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_adapter_win.h')
-rw-r--r-- | device/bluetooth/bluetooth_adapter_win.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/device/bluetooth/bluetooth_adapter_win.h b/device/bluetooth/bluetooth_adapter_win.h index d255448..0265624 100644 --- a/device/bluetooth/bluetooth_adapter_win.h +++ b/device/bluetooth/bluetooth_adapter_win.h @@ -36,8 +36,8 @@ class BluetoothAdapterWin : public BluetoothAdapter, // BluetoothAdapter override virtual void AddObserver(BluetoothAdapter::Observer* observer) OVERRIDE; virtual void RemoveObserver(BluetoothAdapter::Observer* observer) OVERRIDE; - virtual std::string address() const OVERRIDE; - virtual std::string name() const OVERRIDE; + virtual std::string GetAddress() const OVERRIDE; + virtual std::string GetName() const OVERRIDE; virtual bool IsInitialized() const OVERRIDE; virtual bool IsPresent() const OVERRIDE; virtual bool IsPowered() const OVERRIDE; |