OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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. |
| 4 |
| 5 #ifndef CC_TREES_MAIN_THREAD_TASK_RUNNER_H_ |
| 6 #define CC_TREES_MAIN_THREAD_TASK_RUNNER_H_ |
| 7 |
| 8 #include "base/single_thread_task_runner.h" |
| 9 #include "cc/base/cc_export.h" |
| 10 |
| 11 namespace cc { |
| 12 |
| 13 class CC_EXPORT MainThreadTaskRunner : public base::SingleThreadTaskRunner { |
| 14 public: |
| 15 virtual void PostBeginMainFrameTask( |
| 16 const tracked_objects::Location& from_here, const base::Closure& task, |
| 17 double frame_time, double deadline, double interval) = 0; |
| 18 |
| 19 virtual bool PostDelayedTask( |
| 20 const tracked_objects::Location& from_here, const base::Closure& task, |
| 21 base::TimeDelta delay) OVERRIDE; |
| 22 |
| 23 virtual bool PostNonNestableDelayedTask( |
| 24 const tracked_objects::Location& from_here, const base::Closure& task, |
| 25 base::TimeDelta delay) OVERRIDE; |
| 26 |
| 27 virtual bool RunsTasksOnCurrentThread() const OVERRIDE; |
| 28 |
| 29 protected: |
| 30 virtual ~MainThreadTaskRunner() {} |
| 31 }; |
| 32 |
| 33 class CC_EXPORT DefaultMainThreadTaskRunner : public MainThreadTaskRunner { |
| 34 public: |
| 35 virtual bool PostDelayedTask( |
| 36 const tracked_objects::Location& from_here, const base::Closure& task, |
| 37 base::TimeDelta delay) OVERRIDE; |
| 38 |
| 39 virtual void PostBeginMainFrameTask( |
| 40 const tracked_objects::Location& from_here, const base::Closure& task, |
| 41 double frame_time, double deadline, double interval) OVERRIDE; |
| 42 protected: |
| 43 virtual ~DefaultMainThreadTaskRunner() {} |
| 44 }; |
| 45 |
| 46 } // namespace cc |
| 47 |
| 48 #endif // CC_TREES_MAIN_THREAD_TASK_RUNNER_H_ |
OLD | NEW |