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

Side by Side Diff: content/renderer/pepper/pepper_platform_audio_output.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, 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 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 #include "content/renderer/pepper/pepper_platform_audio_output.h" 5 #include "content/renderer/pepper/pepper_platform_audio_output.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 main_message_loop_proxy_->PostTask( 93 main_message_loop_proxy_->PostTask(
94 FROM_HERE, 94 FROM_HERE,
95 base::Bind(&PepperPlatformAudioOutput::OnStreamCreated, 95 base::Bind(&PepperPlatformAudioOutput::OnStreamCreated,
96 this, 96 this,
97 handle, 97 handle,
98 socket_handle, 98 socket_handle,
99 length)); 99 length));
100 } 100 }
101 } 101 }
102 102
103 void PepperPlatformAudioOutput::OnDeviceSwitched(
104 int request_id,
105 media::AudioOutputIPCDelegate::DeviceSwitchResult result) {}
106
103 void PepperPlatformAudioOutput::OnIPCClosed() { ipc_.reset(); } 107 void PepperPlatformAudioOutput::OnIPCClosed() { ipc_.reset(); }
104 108
105 PepperPlatformAudioOutput::~PepperPlatformAudioOutput() { 109 PepperPlatformAudioOutput::~PepperPlatformAudioOutput() {
106 // Make sure we have been shut down. Warning: this will usually happen on 110 // Make sure we have been shut down. Warning: this will usually happen on
107 // the I/O thread! 111 // the I/O thread!
108 DCHECK(!ipc_); 112 DCHECK(!ipc_);
109 DCHECK(!client_); 113 DCHECK(!client_);
110 } 114 }
111 115
112 PepperPlatformAudioOutput::PepperPlatformAudioOutput() 116 PepperPlatformAudioOutput::PepperPlatformAudioOutput()
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 return; 172 return;
169 173
170 ipc_->CloseStream(); 174 ipc_->CloseStream();
171 ipc_.reset(); 175 ipc_.reset();
172 176
173 Release(); // Release for the delegate, balances out the reference taken in 177 Release(); // Release for the delegate, balances out the reference taken in
174 // PepperPlatformAudioOutput::Create. 178 // PepperPlatformAudioOutput::Create.
175 } 179 }
176 180
177 } // namespace content 181 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698