| Index: content/browser/renderer_host/media/audio_renderer_host.h
|
| diff --git a/content/browser/renderer_host/media/audio_renderer_host.h b/content/browser/renderer_host/media/audio_renderer_host.h
|
| index f1e2d2bf27a713c5e5080d6da485f7042137711c..8088a8eebe94ff7901cbc5e5751d2b4b4620f549 100644
|
| --- a/content/browser/renderer_host/media/audio_renderer_host.h
|
| +++ b/content/browser/renderer_host/media/audio_renderer_host.h
|
| @@ -54,6 +54,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/process/process.h"
|
| #include "base/sequenced_task_runner_helpers.h"
|
| +#include "content/browser/renderer_host/media/audio_output_authorization_handler.h"
|
| #include "content/browser/renderer_host/media/media_devices_manager.h"
|
| #include "content/common/content_export.h"
|
| #include "content/public/browser/browser_message_filter.h"
|
| @@ -64,6 +65,7 @@
|
| #include "media/audio/audio_logging.h"
|
| #include "media/audio/audio_output_controller.h"
|
| #include "media/audio/simple_sources.h"
|
| +#include "media/base/output_device_info.h"
|
| #include "url/origin.h"
|
|
|
| namespace media {
|
| @@ -76,7 +78,6 @@ namespace content {
|
| class AudioMirroringManager;
|
| class MediaInternals;
|
| class MediaStreamManager;
|
| -class ResourceContext;
|
|
|
| class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter {
|
| public:
|
| @@ -146,6 +147,12 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter {
|
| const std::string& device_id,
|
| const url::Origin& security_origin);
|
|
|
| + void AuthorizationCompleted(int stream_id,
|
| + base::TimeTicks auth_start_time,
|
| + media::OutputDeviceStatus status,
|
| + media::AudioParameters params,
|
| + const std::string& unique_id);
|
| +
|
| // Creates an audio output stream with the specified format.
|
| // Upon success/failure, the peer is notified via the NotifyStreamCreated
|
| // message.
|
| @@ -200,39 +207,6 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter {
|
| // ResourceScheduler when the renderer starts or stops playing an audiostream.
|
| void UpdateNumPlayingStreams(AudioEntry* entry, bool is_playing);
|
|
|
| - // Check if the renderer process has access to the requested output device.
|
| - void CheckOutputDeviceAccess(int render_frame_id,
|
| - const std::string& device_id,
|
| - const url::Origin& security_origin,
|
| - int stream_id,
|
| - base::TimeTicks auth_start_time);
|
| -
|
| - // Proceed with device authorization after checking permissions.
|
| - void AccessChecked(const std::string& device_id,
|
| - const url::Origin& security_origin,
|
| - int stream_id,
|
| - base::TimeTicks auth_start_time,
|
| - bool have_access);
|
| -
|
| - // Translate the hashed |device_id| to a unique device ID.
|
| - void TranslateDeviceID(const std::string& device_id,
|
| - const url::Origin& security_origin,
|
| - int stream_id,
|
| - base::TimeTicks auth_start_time,
|
| - const MediaDeviceEnumeration& enumeration);
|
| -
|
| - // Get audio hardware parameters on the device thread.
|
| - media::AudioParameters GetDeviceParametersOnDeviceThread(
|
| - const std::string& device_id);
|
| -
|
| - // Proceed with device authorization after translating device ID and
|
| - // receiving hardware parameters.
|
| - void DeviceParametersReceived(int stream_id,
|
| - base::TimeTicks auth_start_time,
|
| - bool device_found,
|
| - const std::string& unique_id,
|
| - const media::AudioParameters& output_params);
|
| -
|
| // Helper method to check if the authorization procedure for stream
|
| // |stream_id| has started.
|
| bool IsAuthorizationStarted(int stream_id);
|
| @@ -251,9 +225,6 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter {
|
| AudioMirroringManager* const mirroring_manager_;
|
| std::unique_ptr<media::AudioLog> audio_log_;
|
|
|
| - // Used to access to AudioInputDeviceManager.
|
| - MediaStreamManager* media_stream_manager_;
|
| -
|
| // A map of stream IDs to audio sources.
|
| AudioEntryMap audio_entries_;
|
|
|
| @@ -261,9 +232,6 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter {
|
| // thread, but should only be updated from the IO thread.
|
| base::AtomicRefCount num_playing_streams_;
|
|
|
| - // Salt required to translate renderer device IDs to raw device unique IDs
|
| - std::string salt_;
|
| -
|
| // Map of device authorizations for streams that are not yet created
|
| // The key is the stream ID, and the value is a pair. The pair's first element
|
| // is a bool that is true if the authorization process completes successfully.
|
| @@ -279,6 +247,8 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter {
|
| // host. Reported as UMA stat at shutdown.
|
| size_t max_simultaneous_streams_;
|
|
|
| + AudioOutputAuthorizationHandler authorization_handler_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
|
| };
|
|
|
|
|