From adabb62712f972e63fb19afc727093b2008d82ad Mon Sep 17 00:00:00 2001 From: "fischman@chromium.org" Date: Thu, 29 Sep 2011 22:36:38 +0000 Subject: Convert all of media/ over to the new base::{Bind,Callback} hotness. Mostly this was a rote conversion, replacing: - Pass-by-pointer CallbackN<>'s become pass-by-const-ref Callback<>'s. - scoped_ptr> members become Callback<> members. - several dedicated FooCallback typedefs became base::Closure. Because it was only used in a small handful of places and only in one place profitably, I deleted AutoCallbackRunner. Because it tickles a Bind bug I disabled mfdecoder in .gyp (about to get deleted in a scherkus CL). BUG=none TEST=media_tests, trybots Review URL: http://codereview.chromium.org/8071007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103376 0039d316-1c4b-4281-b951-d872f2087c98 --- media/audio/audio_output_dispatcher.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'media/audio/audio_output_dispatcher.cc') diff --git a/media/audio/audio_output_dispatcher.cc b/media/audio/audio_output_dispatcher.cc index ac08bcb..7deae9d 100644 --- a/media/audio/audio_output_dispatcher.cc +++ b/media/audio/audio_output_dispatcher.cc @@ -4,6 +4,7 @@ #include "media/audio/audio_output_dispatcher.h" +#include "base/bind.h" #include "base/compiler_specific.h" #include "base/message_loop.h" #include "base/time.h" @@ -56,8 +57,8 @@ AudioOutputStream* AudioOutputDispatcher::StreamStarted() { close_timer_.Reset(); // Schedule task to allocate streams for other proxies if we need to. - message_loop_->PostTask(FROM_HERE, NewRunnableMethod( - this, &AudioOutputDispatcher::OpenTask)); + message_loop_->PostTask(FROM_HERE, base::Bind( + &AudioOutputDispatcher::OpenTask, this)); return stream; } @@ -73,7 +74,7 @@ void AudioOutputDispatcher::StreamStopped(AudioOutputStream* stream) { // Don't recycle stream until two buffers worth of time has elapsed. message_loop_->PostDelayedTask( FROM_HERE, - NewRunnableMethod(this, &AudioOutputDispatcher::StopStreamTask), + base::Bind(&AudioOutputDispatcher::StopStreamTask, this), pause_delay_milliseconds_); } -- cgit v1.1