| Index: device/bluetooth/bluetooth_device_bluez.h
|
| diff --git a/device/bluetooth/bluetooth_device_chromeos.h b/device/bluetooth/bluetooth_device_bluez.h
|
| similarity index 88%
|
| rename from device/bluetooth/bluetooth_device_chromeos.h
|
| rename to device/bluetooth/bluetooth_device_bluez.h
|
| index 92428ac137065f69490c23f4630c7b8a5b0c0dc1..42b466b71debdda1c3ca4240eb097e8c78526f64 100644
|
| --- a/device/bluetooth/bluetooth_device_chromeos.h
|
| +++ b/device/bluetooth/bluetooth_device_bluez.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 DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H
|
| -#define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H
|
| +#ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_BLUEZ_H_
|
| +#define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_BLUEZ_H_
|
|
|
| #include <string>
|
|
|
| @@ -21,19 +21,19 @@ namespace device {
|
| class BluetoothSocketThread;
|
| } // namespace device
|
|
|
| -namespace chromeos {
|
| +namespace bluez {
|
|
|
| -class BluetoothAdapterChromeOS;
|
| -class BluetoothPairingChromeOS;
|
| +class BluetoothAdapterBlueZ;
|
| +class BluetoothPairingBlueZ;
|
|
|
| -// The BluetoothDeviceChromeOS class implements BluetoothDevice for the
|
| +// The BluetoothDeviceBlueZ class implements BluetoothDevice for the
|
| // Chrome OS platform.
|
| //
|
| // This class is not thread-safe, but is only called from the UI thread.
|
| //
|
| // A socket thread is used to create sockets but posts all callbacks on the UI
|
| // thread.
|
| -class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
|
| +class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
|
| : public device::BluetoothDevice,
|
| public bluez::BluetoothGattServiceClient::Observer {
|
| public:
|
| @@ -55,8 +55,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
|
| bool ExpectingPinCode() const override;
|
| bool ExpectingPasskey() const override;
|
| bool ExpectingConfirmation() const override;
|
| - void GetConnectionInfo(
|
| - const ConnectionInfoCallback& callback) override;
|
| + void GetConnectionInfo(const ConnectionInfoCallback& callback) override;
|
| void Connect(device::BluetoothDevice::PairingDelegate* pairing_delegate,
|
| const base::Closure& callback,
|
| const ConnectErrorCallback& error_callback) override;
|
| @@ -83,7 +82,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
|
| // Creates a pairing object with the given delegate |pairing_delegate| and
|
| // establishes it as the pairing context for this device. All pairing-related
|
| // method calls will be forwarded to this object until it is released.
|
| - BluetoothPairingChromeOS* BeginPairing(
|
| + BluetoothPairingBlueZ* BeginPairing(
|
| BluetoothDevice::PairingDelegate* pairing_delegate);
|
|
|
| // Releases the current pairing object, any pairing-related method calls will
|
| @@ -91,13 +90,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
|
| void EndPairing();
|
|
|
| // Returns the current pairing object or NULL if no pairing is in progress.
|
| - BluetoothPairingChromeOS* GetPairing() const;
|
| + BluetoothPairingBlueZ* GetPairing() const;
|
|
|
| // Returns the object path of the device.
|
| const dbus::ObjectPath& object_path() const { return object_path_; }
|
|
|
| // Returns the adapter which owns this device instance.
|
| - BluetoothAdapterChromeOS* adapter() const;
|
| + BluetoothAdapterBlueZ* adapter() const;
|
|
|
| protected:
|
| // BluetoothDevice override
|
| @@ -106,14 +105,14 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
|
| void DisconnectGatt() override;
|
|
|
| private:
|
| - friend class BluetoothAdapterChromeOS;
|
| + friend class BluetoothAdapterBlueZ;
|
|
|
| - BluetoothDeviceChromeOS(
|
| - BluetoothAdapterChromeOS* adapter,
|
| + BluetoothDeviceBlueZ(
|
| + BluetoothAdapterBlueZ* adapter,
|
| const dbus::ObjectPath& object_path,
|
| scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
|
| scoped_refptr<device::BluetoothSocketThread> socket_thread);
|
| - ~BluetoothDeviceChromeOS() override;
|
| + ~BluetoothDeviceBlueZ() override;
|
|
|
| // bluez::BluetoothGattServiceClient::Observer overrides.
|
| void GattServiceAdded(const dbus::ObjectPath& object_path) override;
|
| @@ -134,8 +133,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
|
| void ConnectInternal(bool after_pairing,
|
| const base::Closure& callback,
|
| const ConnectErrorCallback& error_callback);
|
| - void OnConnect(bool after_pairing,
|
| - const base::Closure& callback);
|
| + void OnConnect(bool after_pairing, const base::Closure& callback);
|
| void OnCreateGattConnection(const GattConnectionCallback& callback);
|
| void OnConnectError(bool after_pairing,
|
| const ConnectErrorCallback& error_callback,
|
| @@ -193,15 +191,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
|
| // During pairing this is set to an object that we don't own, but on which
|
| // we can make method calls to request, display or confirm PIN Codes and
|
| // Passkeys. Generally it is the object that owns this one.
|
| - scoped_ptr<BluetoothPairingChromeOS> pairing_;
|
| + scoped_ptr<BluetoothPairingBlueZ> pairing_;
|
|
|
| // Note: This should remain the last member so it'll be destroyed and
|
| // invalidate its weak pointers before any other members are destroyed.
|
| - base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_;
|
| + base::WeakPtrFactory<BluetoothDeviceBlueZ> weak_ptr_factory_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS);
|
| + DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceBlueZ);
|
| };
|
|
|
| -} // namespace chromeos
|
| +} // namespace bluez
|
|
|
| -#endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H
|
| +#endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_BLUEZ_H_
|
|
|