chromium/media/base/serial_runner.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/base/serial_runner.h"

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"

namespace media {

// Converts a Closure into a bound function accepting a PipelineStatusCallback.
static void RunClosure(base::OnceClosure closure,
                       PipelineStatusCallback status_cb) {}

// Converts a bound function accepting a Closure into a bound function
// accepting a PipelineStatusCallback. Since closures have no way of reporting a
// status |status_cb| is executed with PIPELINE_OK.
static void RunBoundClosure(SerialRunner::BoundClosure bound_closure,
                            PipelineStatusCallback status_cb) {}

// Runs |status_cb| with |last_status| on |task_runner|.
static void RunOnTaskRunner(
    const scoped_refptr<base::SequencedTaskRunner>& task_runner,
    PipelineStatusCallback status_cb,
    PipelineStatus last_status) {}

SerialRunner::Queue::Queue() = default;
SerialRunner::Queue::Queue(Queue&& other) = default;
SerialRunner::Queue::~Queue() = default;

void SerialRunner::Queue::Push(base::OnceClosure closure) {}

void SerialRunner::Queue::Push(BoundClosure bound_closure) {}

void SerialRunner::Queue::Push(BoundPipelineStatusCallback bound_status_cb) {}

SerialRunner::BoundPipelineStatusCallback SerialRunner::Queue::Pop() {}

bool SerialRunner::Queue::empty() {}

SerialRunner::SerialRunner(Queue&& bound_fns, PipelineStatusCallback done_cb)
    :{}

SerialRunner::~SerialRunner() = default;

std::unique_ptr<SerialRunner> SerialRunner::Run(
    Queue&& bound_fns,
    PipelineStatusCallback done_cb) {}

void SerialRunner::RunNextInSeries(PipelineStatus last_status) {}

}  // namespace media