Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1226)

Unified Diff: device/bluetooth/bluetooth_audio_sink_chromeos.h

Issue 939753004: device/bluetooth: Implement Unregister() of BlueotoothAudioSinkChromeOS and disconnection-related c… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_audio_sink_chromeos.h
diff --git a/device/bluetooth/bluetooth_audio_sink_chromeos.h b/device/bluetooth/bluetooth_audio_sink_chromeos.h
index 3af285b68732b2f87083c9426214dcc2c46c527c..6d7df994800e502ba83e1eb13863ac2323b00620 100644
--- a/device/bluetooth/bluetooth_audio_sink_chromeos.h
+++ b/device/bluetooth/bluetooth_audio_sink_chromeos.h
@@ -39,9 +39,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSinkChromeOS
// Unregisters a BluetoothAudioSink. |callback| should handle
// the clean-up after the audio sink is deleted successfully, otherwise
// |error_callback| will be called.
- void Unregister(
- const base::Closure& callback,
- const device::BluetoothAudioSink::ErrorCallback& error_callback) override;
+ void Unregister(const base::Closure& callback) override;
Ben Chan 2015/02/19 00:21:45 comment needs updated
Miao 2015/02/23 21:04:25 Recovered the error callback, so the the comment s
void AddObserver(BluetoothAudioSink::Observer* observer) override;
void RemoveObserver(BluetoothAudioSink::Observer* observer) override;
device::BluetoothAudioSink::State GetState() const override;
@@ -50,6 +48,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSinkChromeOS
// device::BluetoothAdapter::Observer overrides.
void AdapterPresentChanged(device::BluetoothAdapter* adapter,
bool present) override;
+ void AdapterPoweredChanged(device::BluetoothAdapter* adapter,
+ bool powered) override;
// BluetoothMediaClient::Observer overrides.
void MediaRemoved(const dbus::ObjectPath& object_path) override;
@@ -95,9 +95,18 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSinkChromeOS
void OnRegisterSucceeded(const base::Closure& callback);
// Called when the registration of Media Endpoint failed.
- void OnRegisterFailed(const BluetoothAudioSink::ErrorCallback& error_callback,
- const std::string& error_name,
- const std::string& error_message);
+ void OnRegisterFailed(
+ const device::BluetoothAudioSink::ErrorCallback& error_callback,
+ const std::string& error_name,
+ const std::string& error_message);
+
+ // Called when the unregistration of Media Endpoint has succeeded. The
+ // clean-up of media, media transport and media endpoint will be handled here.
+ void OnUnregisterSucceeded(const base::Closure& callback);
+
+ // Called when the unregistration of Media Endpoint failed.
+ void OnUnregisterFailed(const std::string& error_name,
+ const std::string& error_message);
// Reads from the file descriptor acquired via Media Transport object and
// notify |observer_| while the audio data is available.
@@ -115,13 +124,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSinkChromeOS
device::BluetoothAudioSink::State state_;
// The volume control by the remote device during the streaming.
- uint16_t volume_;
+ scoped_ptr<uint16_t> volume_;
// Read MTU of the file descriptor acquired via Media Transport object.
- uint16_t read_mtu_;
+ scoped_ptr<uint16_t> read_mtu_;
// Write MTU of the file descriptor acquired via Media Transport object.
- uint16_t write_mtu_;
+ scoped_ptr<uint16_t> write_mtu_;
// File descriptor acquired via Media Transport object.
dbus::FileDescriptor fd_;

Powered by Google App Engine
This is Rietveld 408576698