| Index: media/base/serial_runner.cc
|
| diff --git a/media/base/serial_runner.cc b/media/base/serial_runner.cc
|
| index 257cd910ae8a6e56ca1b9fdb5f56d6fd7c04c91b..779566c794100d853533e7aaeeb8d33303bc7135 100644
|
| --- a/media/base/serial_runner.cc
|
| +++ b/media/base/serial_runner.cc
|
| @@ -12,6 +12,14 @@
|
|
|
| namespace media {
|
|
|
| +// Converts a Closure into a bound function accepting a PipelineStatusCB.
|
| +static void RunClosure(
|
| + const base::Closure& closure,
|
| + const PipelineStatusCB& status_cb) {
|
| + closure.Run();
|
| + status_cb.Run(PIPELINE_OK);
|
| +}
|
| +
|
| // Converts a bound function accepting a Closure into a bound function
|
| // accepting a PipelineStatusCB. Since closures have no way of reporting a
|
| // status |status_cb| is executed with PIPELINE_OK.
|
| @@ -34,6 +42,10 @@ static void RunOnTaskRunner(
|
| SerialRunner::Queue::Queue() {}
|
| SerialRunner::Queue::~Queue() {}
|
|
|
| +void SerialRunner::Queue::Push(const base::Closure& closure) {
|
| + bound_fns_.push(base::Bind(&RunClosure, closure));
|
| +}
|
| +
|
| void SerialRunner::Queue::Push(
|
| const BoundClosure& bound_closure) {
|
| bound_fns_.push(base::Bind(&RunBoundClosure, bound_closure));
|
|
|