Index: cc/trees/main_thread_task_runner.h |
diff --git a/cc/trees/main_thread_task_runner.h b/cc/trees/main_thread_task_runner.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..19416de493c96d22c33fcca7889404aeb167f7b4 |
--- /dev/null |
+++ b/cc/trees/main_thread_task_runner.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2014 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 CC_TREES_MAIN_THREAD_TASK_RUNNER_H_ |
+#define CC_TREES_MAIN_THREAD_TASK_RUNNER_H_ |
+ |
+#include "base/single_thread_task_runner.h" |
+#include "cc/base/cc_export.h" |
+ |
+namespace cc { |
+ |
+class CC_EXPORT MainThreadTaskRunner : public base::SingleThreadTaskRunner { |
+ public: |
+ virtual void PostBeginMainFrameTask( |
+ const tracked_objects::Location& from_here, const base::Closure& task, |
+ double frame_time, double deadline, double interval) = 0; |
+ |
+ virtual bool PostDelayedTask( |
+ const tracked_objects::Location& from_here, const base::Closure& task, |
+ base::TimeDelta delay) OVERRIDE; |
+ |
+ virtual bool PostNonNestableDelayedTask( |
+ const tracked_objects::Location& from_here, const base::Closure& task, |
+ base::TimeDelta delay) OVERRIDE; |
+ |
+ virtual bool RunsTasksOnCurrentThread() const OVERRIDE; |
+ |
+ protected: |
+ virtual ~MainThreadTaskRunner() {} |
+}; |
+ |
+class CC_EXPORT DefaultMainThreadTaskRunner : public MainThreadTaskRunner { |
+ public: |
+ virtual bool PostDelayedTask( |
+ const tracked_objects::Location& from_here, const base::Closure& task, |
+ base::TimeDelta delay) OVERRIDE; |
+ |
+ virtual void PostBeginMainFrameTask( |
+ const tracked_objects::Location& from_here, const base::Closure& task, |
+ double frame_time, double deadline, double interval) OVERRIDE; |
+ protected: |
+ virtual ~DefaultMainThreadTaskRunner() {} |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_TREES_MAIN_THREAD_TASK_RUNNER_H_ |