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

Unified Diff: media/audio/audio_output_device.h

Issue 2043883005: Implementing AudioOutputDevice authorization timeout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "Review comments addrests; UMA stats and unit test added" Created 4 years, 6 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
« no previous file with comments | « no previous file | media/audio/audio_output_device.cc » ('j') | media/audio/audio_output_device.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_device.h
diff --git a/media/audio/audio_output_device.h b/media/audio/audio_output_device.h
index 532f45fe4a13eeb6b8b2884292e28652da3690f1..1cd3942350c0ad5413258823e90b01d793c9cd94 100644
--- a/media/audio/audio_output_device.h
+++ b/media/audio/audio_output_device.h
@@ -77,6 +77,11 @@
#include "media/base/media_export.h"
#include "media/base/output_device_info.h"
+namespace base {
+class OneShotTimer;
+class ElapsedTimer;
+}
+
namespace media {
class MEDIA_EXPORT AudioOutputDevice
@@ -145,6 +150,13 @@ class MEDIA_EXPORT AudioOutputDevice
void ShutDownOnIOThread();
void SetVolumeOnIOThread(double volume);
+ // Process device authorization result on the IO thread.
+ void ProcessDeviceAuthorizationOnIOThread(
+ OutputDeviceStatus device_status,
+ const media::AudioParameters& output_params,
+ const std::string& matched_device_id,
+ bool timed_out);
+
// base::MessageLoop::DestructionObserver implementation for the IO loop.
// If the IO loop dies before we do, we shut down the audio thread from here.
void WillDestroyCurrentMessageLoop() override;
@@ -201,6 +213,9 @@ class MEDIA_EXPORT AudioOutputDevice
AudioParameters output_params_;
OutputDeviceStatus device_status_;
+ std::unique_ptr<base::OneShotTimer> auth_timeout_action_;
+ std::unique_ptr<base::ElapsedTimer> auth_delay_;
+
DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice);
};
« no previous file with comments | « no previous file | media/audio/audio_output_device.cc » ('j') | media/audio/audio_output_device.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698