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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host.h

Issue 1602083003: Correctly handle enumerations for AudioManagers that report only the default audio output device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments Created 4 years, 11 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
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 // AudioRendererHost serves audio related requests from AudioRenderer which 5 // AudioRendererHost serves audio related requests from AudioRenderer which
6 // lives inside the render process and provide access to audio hardware. 6 // lives inside the render process and provide access to audio hardware.
7 // 7 //
8 // This class is owned by RenderProcessHostImpl, and instantiated on UI 8 // This class is owned by RenderProcessHostImpl, and instantiated on UI
9 // thread, but all other operations and method calls happen on IO thread, so we 9 // thread, but all other operations and method calls happen on IO thread, so we
10 // need to be extra careful about the lifetime of this object. AudioManager is a 10 // need to be extra careful about the lifetime of this object. AudioManager is a
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 // Invoke |callback| after permission to use a device has been checked. 225 // Invoke |callback| after permission to use a device has been checked.
226 void AccessChecked(scoped_ptr<MediaStreamUIProxy> ui_proxy, 226 void AccessChecked(scoped_ptr<MediaStreamUIProxy> ui_proxy,
227 const OutputDeviceAccessCB& callback, 227 const OutputDeviceAccessCB& callback,
228 bool have_access); 228 bool have_access);
229 229
230 // Translate the hashed |device_id| to a unique device ID. 230 // Translate the hashed |device_id| to a unique device ID.
231 void TranslateDeviceID(const std::string& device_id, 231 void TranslateDeviceID(const std::string& device_id,
232 const GURL& gurl_security_origin, 232 const GURL& gurl_security_origin,
233 const OutputDeviceInfoCB& callback, 233 const OutputDeviceInfoCB& callback,
234 const AudioOutputDeviceEnumeration& device_infos); 234 const AudioOutputDeviceEnumeration& enumeration);
235 235
236 // Helper method to check if the authorization procedure for stream 236 // Helper method to check if the authorization procedure for stream
237 // |stream_id| has started. 237 // |stream_id| has started.
238 bool IsAuthorizationStarted(int stream_id); 238 bool IsAuthorizationStarted(int stream_id);
239 239
240 // ID of the RenderProcessHost that owns this instance. 240 // ID of the RenderProcessHost that owns this instance.
241 const int render_process_id_; 241 const int render_process_id_;
242 242
243 media::AudioManager* const audio_manager_; 243 media::AudioManager* const audio_manager_;
244 AudioMirroringManager* const mirroring_manager_; 244 AudioMirroringManager* const mirroring_manager_;
(...skipping 21 matching lines...) Expand all
266 // The maximum number of simultaneous streams during the lifetime of this 266 // The maximum number of simultaneous streams during the lifetime of this
267 // host. Reported as UMA stat at shutdown. 267 // host. Reported as UMA stat at shutdown.
268 size_t max_simultaneous_streams_; 268 size_t max_simultaneous_streams_;
269 269
270 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); 270 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
271 }; 271 };
272 272
273 } // namespace content 273 } // namespace content
274 274
275 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ 275 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698