| Index: chromecast/base/task_runner_impl.h
|
| diff --git a/chromecast/base/task_runner_impl.h b/chromecast/base/task_runner_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..14d1d1eb7be16c72ae8ae5a649e2c257537d7455
|
| --- /dev/null
|
| +++ b/chromecast/base/task_runner_impl.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// NOTE: This is included in the review for clarity, but this will be submitted
|
| +// in halliwell@'s review (1257013003), so this should be removed before
|
| +// submit.
|
| +
|
| +#ifndef CHROMECAST_BASE_TASK_RUNNER_IMPL_H_
|
| +#define CHROMECAST_BASE_TASK_RUNNER_IMPL_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "chromecast/public/task_runner.h"
|
| +
|
| +namespace base {
|
| +class SingleThreadTaskRunner;
|
| +}
|
| +
|
| +namespace chromecast {
|
| +
|
| +// Implementation of public TaskRunner interface that just calls
|
| +// base::ThreadTaskRunnerHandle at construction time and uses it to post.
|
| +class TaskRunnerImpl : public TaskRunner {
|
| + public:
|
| + TaskRunnerImpl();
|
| + ~TaskRunnerImpl() override;
|
| +
|
| + bool BelongsToCurrentThread() override;
|
| + bool PostTask(Task* task, uint64_t milliseconds) override;
|
| +
|
| + private:
|
| + scoped_refptr<base::SingleThreadTaskRunner> runner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TaskRunnerImpl);
|
| +};
|
| +
|
| +} // namespace chromecast
|
| +
|
| +#endif // CHROMECAST_BASE_TASK_RUNNER_IMPL_H_
|
|
|