| Index: device/bluetooth/bluetooth_adapter_chromeos.h
|
| diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter_chromeos.h b/device/bluetooth/bluetooth_adapter_chromeos.h
|
| similarity index 86%
|
| rename from chrome/browser/chromeos/bluetooth/bluetooth_adapter_chromeos.h
|
| rename to device/bluetooth/bluetooth_adapter_chromeos.h
|
| index 2a0db654923426b15ac0758709fada03bd72233d..18cb7aaf5e42379648801161bce972a9595929b0 100644
|
| --- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter_chromeos.h
|
| +++ b/device/bluetooth/bluetooth_adapter_chromeos.h
|
| @@ -2,8 +2,8 @@
|
| // 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_CHROMEOS_H_
|
| -#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
|
| +#ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
|
| +#define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
|
|
|
| #include <map>
|
| #include <string>
|
| @@ -12,28 +12,37 @@
|
| #include "base/basictypes.h"
|
| #include "base/callback.h"
|
| #include "base/observer_list.h"
|
| -#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
|
| #include "chromeos/dbus/bluetooth_adapter_client.h"
|
| #include "chromeos/dbus/bluetooth_device_client.h"
|
| #include "chromeos/dbus/bluetooth_manager_client.h"
|
| #include "dbus/object_path.h"
|
| +#include "device/bluetooth/bluetooth_adapter.h"
|
| +
|
| +namespace device {
|
| +
|
| +class BluetoothAdapterFactory;
|
| +class MockBluetoothAdapter;
|
| +struct BluetoothOutOfBandPairingData;
|
| +
|
| +} // namespace device
|
|
|
| namespace chromeos {
|
|
|
| class BluetoothDeviceChromeOs;
|
|
|
| -struct BluetoothOutOfBandPairingData;
|
| -
|
| // The BluetoothAdapterChromeOs class is an implementation of BluetoothAdapter
|
| // for Chrome OS platform.
|
| -class BluetoothAdapterChromeOs : public BluetoothAdapter,
|
| - public BluetoothManagerClient::Observer,
|
| - public BluetoothAdapterClient::Observer,
|
| - public BluetoothDeviceClient::Observer {
|
| +class BluetoothAdapterChromeOs
|
| + : public device::BluetoothAdapter,
|
| + public BluetoothManagerClient::Observer,
|
| + public BluetoothAdapterClient::Observer,
|
| + public BluetoothDeviceClient::Observer {
|
| public:
|
| // BluetoothAdapter override
|
| - virtual void AddObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
|
| - virtual void RemoveObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
|
| + virtual void AddObserver(
|
| + device::BluetoothAdapter::Observer* observer) OVERRIDE;
|
| + virtual void RemoveObserver(
|
| + device::BluetoothAdapter::Observer* observer) OVERRIDE;
|
| virtual bool IsPresent() const OVERRIDE;
|
| virtual bool IsPowered() const OVERRIDE;
|
| virtual void SetPowered(
|
| @@ -46,17 +55,19 @@ class BluetoothAdapterChromeOs : public BluetoothAdapter,
|
| const base::Closure& callback,
|
| const ErrorCallback& error_callback) OVERRIDE;
|
| virtual ConstDeviceList GetDevices() const OVERRIDE;
|
| - virtual BluetoothDevice* GetDevice(const std::string& address) OVERRIDE;
|
| - virtual const BluetoothDevice* GetDevice(
|
| + virtual device::BluetoothDevice* GetDevice(
|
| + const std::string& address) OVERRIDE;
|
| + virtual const device::BluetoothDevice* GetDevice(
|
| const std::string& address) const OVERRIDE;
|
| virtual void ReadLocalOutOfBandPairingData(
|
| - const BluetoothOutOfBandPairingDataCallback& callback,
|
| + const device::BluetoothAdapter::BluetoothOutOfBandPairingDataCallback&
|
| + callback,
|
| const ErrorCallback& error_callback) OVERRIDE;
|
|
|
| private:
|
| - friend class BluetoothAdapterFactory;
|
| friend class BluetoothDeviceChromeOs;
|
| - friend class MockBluetoothAdapter;
|
| + friend class device::BluetoothAdapterFactory;
|
| + friend class device::MockBluetoothAdapter;
|
|
|
| BluetoothAdapterChromeOs();
|
| virtual ~BluetoothAdapterChromeOs();
|
| @@ -125,10 +136,12 @@ class BluetoothAdapterChromeOs : public BluetoothAdapter,
|
| void DiscoveringChanged(bool discovering);
|
|
|
| // Called by dbus:: in response to the ReadLocalData method call.
|
| - void OnReadLocalData(const BluetoothOutOfBandPairingDataCallback& callback,
|
| - const ErrorCallback& error_callback,
|
| - const BluetoothOutOfBandPairingData& data,
|
| - bool success);
|
| + void OnReadLocalData(
|
| + const device::BluetoothAdapter::BluetoothOutOfBandPairingDataCallback&
|
| + callback,
|
| + const ErrorCallback& error_callback,
|
| + const device::BluetoothOutOfBandPairingData& data,
|
| + bool success);
|
|
|
| // BluetoothAdapterClient::Observer override.
|
| //
|
| @@ -200,7 +213,7 @@ class BluetoothAdapterChromeOs : public BluetoothAdapter,
|
| const std::string& address) OVERRIDE;
|
|
|
| // List of observers interested in event notifications from us.
|
| - ObserverList<BluetoothAdapter::Observer> observers_;
|
| + ObserverList<device::BluetoothAdapter::Observer> observers_;
|
|
|
| // Object path of adapter for this instance, this is fixed at creation time
|
| // unless |track_default_| is true in which case we update it to always
|
| @@ -229,4 +242,4 @@ class BluetoothAdapterChromeOs : public BluetoothAdapter,
|
|
|
| } // namespace chromeos
|
|
|
| -#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
|
| +#endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
|
|
|