Update V8 to version 4.6.63.
[chromium-blink-merge.git] / chromecast / base / task_runner_impl.h
blob110274d96c85928a01a4ba4b567e3c139b66f914
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_BASE_TASK_RUNNER_IMPL_H_
6 #define CHROMECAST_BASE_TASK_RUNNER_IMPL_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "chromecast/public/task_runner.h"
12 namespace base {
13 class SingleThreadTaskRunner;
16 namespace chromecast {
18 // Implementation of public TaskRunner interface that just calls
19 // base::ThreadTaskRunnerHandle at construction time and uses it to post.
20 class TaskRunnerImpl : public TaskRunner {
21 public:
22 TaskRunnerImpl();
23 ~TaskRunnerImpl() override;
25 bool PostTask(Task* task, uint64_t delay_milliseconds) override;
27 const scoped_refptr<base::SingleThreadTaskRunner>& runner() const {
28 return runner_;
31 private:
32 const scoped_refptr<base::SingleThreadTaskRunner> runner_;
34 DISALLOW_COPY_AND_ASSIGN(TaskRunnerImpl);
37 } // namespace chromecast
39 #endif // CHROMECAST_BASE_TASK_RUNNER_IMPL_H_