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

Unified Diff: content/renderer/pepper/pepper_platform_audio_output.cc

Issue 1142063003: content/child: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. 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: content/renderer/pepper/pepper_platform_audio_output.cc
diff --git a/content/renderer/pepper/pepper_platform_audio_output.cc b/content/renderer/pepper/pepper_platform_audio_output.cc
index ce18f86b9d229ae6fcde0390a5471248c2190339..e0a990a4890d785813a77c74182dca5019610ed5 100644
--- a/content/renderer/pepper/pepper_platform_audio_output.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output.cc
@@ -40,7 +40,7 @@ PepperPlatformAudioOutput* PepperPlatformAudioOutput::Create(
bool PepperPlatformAudioOutput::StartPlayback() {
if (ipc_) {
- io_message_loop_proxy_->PostTask(
+ io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&PepperPlatformAudioOutput::StartPlaybackOnIOThread, this));
return true;
@@ -50,7 +50,7 @@ bool PepperPlatformAudioOutput::StartPlayback() {
bool PepperPlatformAudioOutput::StopPlayback() {
if (ipc_) {
- io_message_loop_proxy_->PostTask(
+ io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&PepperPlatformAudioOutput::StopPlaybackOnIOThread, this));
return true;
@@ -62,7 +62,7 @@ void PepperPlatformAudioOutput::ShutDown() {
// Called on the main thread to stop all audio callbacks. We must only change
// the client on the main thread, and the delegates from the I/O thread.
client_ = NULL;
- io_message_loop_proxy_->PostTask(
+ io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&PepperPlatformAudioOutput::ShutDownOnIOThread, this));
}
@@ -112,7 +112,7 @@ PepperPlatformAudioOutput::~PepperPlatformAudioOutput() {
PepperPlatformAudioOutput::PepperPlatformAudioOutput()
: client_(NULL),
main_message_loop_proxy_(base::MessageLoopProxy::current()),
- io_message_loop_proxy_(ChildProcess::current()->io_message_loop_proxy()) {
+ io_task_runner_(ChildProcess::current()->io_task_runner()) {
}
bool PepperPlatformAudioOutput::Initialize(int sample_rate,
@@ -133,35 +133,34 @@ bool PepperPlatformAudioOutput::Initialize(int sample_rate,
ppapi::kBitsPerAudioOutputSample,
frames_per_buffer);
- io_message_loop_proxy_->PostTask(
- FROM_HERE,
- base::Bind(
- &PepperPlatformAudioOutput::InitializeOnIOThread, this, params));
+ io_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&PepperPlatformAudioOutput::InitializeOnIOThread,
+ this, params));
return true;
}
void PepperPlatformAudioOutput::InitializeOnIOThread(
const media::AudioParameters& params) {
- DCHECK(io_message_loop_proxy_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
const int kSessionId = 0;
if (ipc_)
ipc_->CreateStream(this, params, kSessionId);
}
void PepperPlatformAudioOutput::StartPlaybackOnIOThread() {
- DCHECK(io_message_loop_proxy_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
if (ipc_)
ipc_->PlayStream();
}
void PepperPlatformAudioOutput::StopPlaybackOnIOThread() {
- DCHECK(io_message_loop_proxy_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
if (ipc_)
ipc_->PauseStream();
}
void PepperPlatformAudioOutput::ShutDownOnIOThread() {
- DCHECK(io_message_loop_proxy_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
// Make sure we don't call shutdown more than once.
if (!ipc_)
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_output.h ('k') | content/renderer/pepper/pepper_proxy_channel_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698