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

Side by Side Diff: cc/trees/main_thread_task_runner.h

Issue 363383002: Forward input tasks to the Blink scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. DefaultMainThreadTaskRunner now dispatches properly. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698