Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: chromecast/base/task_runner_impl.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test + android fixes Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/base/task_runner_impl.cc » ('j') | chromecast/base/task_runner_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b798932d7aacac3ef0222db34b6021859a0d09fd
--- /dev/null
+++ b/chromecast/base/task_runner_impl.h
@@ -0,0 +1,34 @@
+// Copyright (c) 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.
+
+#ifndef CHROMECAST_BASE_TASK_RUNNER_IMPL_H_
+#define CHROMECAST_BASE_TASK_RUNNER_IMPL_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) override;
+ bool PostDelayedTask(Task* task, TimeDelta delay) override;
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> runner_;
byungchul 2015/07/27 18:22:23 DISALLOW_..
halliwell 2015/07/28 02:19:35 Done.
+};
+
+} // namespace chromecast
+
+#endif // CHROMECAST_BASE_TASK_RUNNER_IMPL_H_
« no previous file with comments | « no previous file | chromecast/base/task_runner_impl.cc » ('j') | chromecast/base/task_runner_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698