| Index: device/bluetooth/bluetooth_adapter_profile_chromeos.h
|
| diff --git a/device/bluetooth/bluetooth_adapter_profile_chromeos.h b/device/bluetooth/bluetooth_adapter_profile_chromeos.h
|
| index 1fc58b7de52f4978e01289d8bdb5f439ae503962..5f1edc2ead5e57aa892079cac232e8b71460515c 100644
|
| --- a/device/bluetooth/bluetooth_adapter_profile_chromeos.h
|
| +++ b/device/bluetooth/bluetooth_adapter_profile_chromeos.h
|
| @@ -21,31 +21,23 @@
|
| // profile for custom Bluetooth services managed by a BluetoothAdapter.
|
| // Maintains a list of delegates which may serve the profile.
|
| // One delegate is allowed for each device.
|
| -//
|
| -// BluetoothAdapterProfileChromeOS objects are owned by the
|
| -// BluetoothAdapterChromeOS and allocated through Register()
|
| class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterProfileChromeOS
|
| : public chromeos::BluetoothProfileServiceProvider::Delegate {
|
| public:
|
| - typedef base::Callback<void(BluetoothAdapterProfileChromeOS* profile)>
|
| - ProfileRegisteredCallback;
|
| -
|
| // Registers a profile with the BlueZ server for |uuid| with the
|
| // options |options|. Returns a newly allocated pointer, or nullptr
|
| // if there was a problem.
|
| static BluetoothAdapterProfileChromeOS* Register(
|
| + BluetoothAdapterChromeOS* adapter,
|
| const device::BluetoothUUID& uuid,
|
| const BluetoothProfileManagerClient::Options& options,
|
| - const ProfileRegisteredCallback& success_callback,
|
| + const base::Closure& success_callback,
|
| const BluetoothProfileManagerClient::ErrorCallback& error_callback);
|
|
|
| ~BluetoothAdapterProfileChromeOS() override;
|
|
|
| // The object path of the profile.
|
| const dbus::ObjectPath& object_path() const { return object_path_; }
|
| -
|
| - // Returns the UUID of the profile
|
| - const device::BluetoothUUID& uuid() const { return uuid_; }
|
|
|
| // Add a delegate for a device associated with this profile.
|
| // An empty |device_path| indicates a local listening service.
|
| @@ -63,7 +55,8 @@
|
| size_t DelegateCount() const { return delegates_.size(); }
|
|
|
| private:
|
| - BluetoothAdapterProfileChromeOS(const device::BluetoothUUID& uuid);
|
| + BluetoothAdapterProfileChromeOS(BluetoothAdapterChromeOS* adapter,
|
| + const device::BluetoothUUID& uuid);
|
|
|
| // BluetoothProfileServiceProvider::Delegate:
|
| void Released() override;
|
| @@ -93,6 +86,9 @@
|
| // Profile dbus object for receiving profile method calls from BlueZ
|
| scoped_ptr<BluetoothProfileServiceProvider> profile_;
|
|
|
| + // Adapter that owns this profile.
|
| + BluetoothAdapterChromeOS* adapter_;
|
| +
|
| // 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<BluetoothAdapterProfileChromeOS> weak_ptr_factory_;
|
|
|