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

Side by Side Diff: content/renderer/media/audio_device_factory.cc

Issue 2116443002: Restricting output device authorization timeout to Windows only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/audio/audio_output_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/audio_device_factory.h" 5 #include "content/renderer/media/audio_device_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/common/content_constants_internal.h" 10 #include "content/common/content_constants_internal.h"
11 #include "content/renderer/media/audio_input_message_filter.h" 11 #include "content/renderer/media/audio_input_message_filter.h"
12 #include "content/renderer/media/audio_message_filter.h" 12 #include "content/renderer/media/audio_message_filter.h"
13 #include "content/renderer/media/audio_renderer_mixer_manager.h" 13 #include "content/renderer/media/audio_renderer_mixer_manager.h"
14 #include "content/renderer/render_thread_impl.h" 14 #include "content/renderer/render_thread_impl.h"
15 #include "media/audio/audio_input_device.h" 15 #include "media/audio/audio_input_device.h"
16 #include "media/audio/audio_output_device.h" 16 #include "media/audio/audio_output_device.h"
17 #include "media/base/audio_latency.h" 17 #include "media/base/audio_latency.h"
18 #include "media/base/audio_renderer_mixer_input.h" 18 #include "media/base/audio_renderer_mixer_input.h"
19 #include "url/origin.h" 19 #include "url/origin.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 // static 23 // static
24 AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL; 24 AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL;
25 25
26 namespace { 26 namespace {
27 #if defined(OS_WIN)
27 const int64_t kMaxAuthorizationTimeoutMs = 900; 28 const int64_t kMaxAuthorizationTimeoutMs = 900;
Guido Urdaneta 2016/06/30 09:11:02 Add a comment explaining why the timeout is necess
29 #else
30 const int64_t kMaxAuthorizationTimeoutMs = 0; // No timeout.
31 #endif // defined(OS_WIN)
28 32
29 media::AudioLatency::LatencyType GetSourceLatencyType( 33 media::AudioLatency::LatencyType GetSourceLatencyType(
30 AudioDeviceFactory::SourceType source) { 34 AudioDeviceFactory::SourceType source) {
31 switch (source) { 35 switch (source) {
32 case AudioDeviceFactory::kSourceWebAudioInteractive: 36 case AudioDeviceFactory::kSourceWebAudioInteractive:
33 return media::AudioLatency::LATENCY_INTERACTIVE; 37 return media::AudioLatency::LATENCY_INTERACTIVE;
34 case AudioDeviceFactory::kSourceNone: 38 case AudioDeviceFactory::kSourceNone:
35 case AudioDeviceFactory::kSourceWebRtc: 39 case AudioDeviceFactory::kSourceWebRtc:
36 case AudioDeviceFactory::kSourceNonRtcAudioTrack: 40 case AudioDeviceFactory::kSourceNonRtcAudioTrack:
37 case AudioDeviceFactory::kSourceWebAudioBalanced: 41 case AudioDeviceFactory::kSourceWebAudioBalanced:
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 device_id, security_origin); 204 device_id, security_origin);
201 if (sink) 205 if (sink)
202 return sink; 206 return sink;
203 } 207 }
204 208
205 return NewOutputDevice(render_frame_id, session_id, device_id, 209 return NewOutputDevice(render_frame_id, session_id, device_id,
206 security_origin); 210 security_origin);
207 } 211 }
208 212
209 } // namespace content 213 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_output_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698