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

Unified Diff: media/mojo/services/mojo_renderer_impl.cc

Issue 1122393004: Add support for switching the audio output device for HTMLMediaElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to MediaPlayers so that they invoke callbacks in the correct threads. First complete implem… Created 5 years, 7 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: media/mojo/services/mojo_renderer_impl.cc
diff --git a/media/mojo/services/mojo_renderer_impl.cc b/media/mojo/services/mojo_renderer_impl.cc
index 73e677ddb997a1e55b7ba1c2cf6be651a34541ed..85f26dbb02953c1d07d8017997d5ea0bf6cd1f69 100644
--- a/media/mojo/services/mojo_renderer_impl.cc
+++ b/media/mojo/services/mojo_renderer_impl.cc
@@ -115,6 +115,14 @@ void MojoRendererImpl::SetVolume(float volume) {
remote_media_renderer_->SetVolume(volume);
}
+void MojoRendererImpl::SwitchAudioOutputDevice(const std::string& device_id,
+ const GURL& security_origin) {
+ DVLOG(2) << __FUNCTION__;
+ DCHECK(task_runner_->BelongsToCurrentThread());
+ remote_media_renderer_->SwitchAudioOutputDevice(
+ mojo::String(device_id), mojo::String(security_origin.spec()));
+}
+
base::TimeDelta MojoRendererImpl::GetMediaTime() {
base::AutoLock auto_lock(lock_);
DVLOG(3) << __FUNCTION__ << ": " << time_.InMilliseconds() << " ms";

Powered by Google App Engine
This is Rietveld 408576698