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

Side by Side Diff: components/scheduler/child/web_scheduler_impl.h

Issue 1309423004: Introduce WebTaskRunner Patch 4/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try and fix compile Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_ 5 #ifndef CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_
6 #define CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_ 6 #define CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 24 matching lines...) Expand all
35 // blink::WebScheduler implementation: 35 // blink::WebScheduler implementation:
36 virtual void shutdown(); 36 virtual void shutdown();
37 virtual bool shouldYieldForHighPriorityWork(); 37 virtual bool shouldYieldForHighPriorityWork();
38 virtual bool canExceedIdleDeadlineIfRequired(); 38 virtual bool canExceedIdleDeadlineIfRequired();
39 virtual void postIdleTask(const blink::WebTraceLocation& location, 39 virtual void postIdleTask(const blink::WebTraceLocation& location,
40 blink::WebThread::IdleTask* task); 40 blink::WebThread::IdleTask* task);
41 virtual void postNonNestableIdleTask(const blink::WebTraceLocation& location, 41 virtual void postNonNestableIdleTask(const blink::WebTraceLocation& location,
42 blink::WebThread::IdleTask* task); 42 blink::WebThread::IdleTask* task);
43 virtual void postIdleTaskAfterWakeup(const blink::WebTraceLocation& location, 43 virtual void postIdleTaskAfterWakeup(const blink::WebTraceLocation& location,
44 blink::WebThread::IdleTask* task); 44 blink::WebThread::IdleTask* task);
45 // TODO(alexclarke): Remove this.
46 virtual void postLoadingTask(const blink::WebTraceLocation& location,
47 blink::WebThread::Task* task);
48 virtual blink::WebTaskRunner* loadingTaskRunner(); 45 virtual blink::WebTaskRunner* loadingTaskRunner();
49 virtual blink::WebTaskRunner* timerTaskRunner(); 46 virtual blink::WebTaskRunner* timerTaskRunner();
50 47
51 // TODO(alexclarke): Remove when possible. 48 // TODO(alexclarke): Remove when possible.
52 virtual void postTimerTaskAt(const blink::WebTraceLocation& location, 49 virtual void postTimerTaskAt(const blink::WebTraceLocation& location,
53 blink::WebThread::Task* task,
54 double monotonicTime);
55 // TODO(alexclarke): Remove when possible.
56 virtual void postTimerTaskAt(const blink::WebTraceLocation& location,
57 blink::WebTaskRunner::Task* task, 50 blink::WebTaskRunner::Task* task,
58 double monotonicTime); 51 double monotonicTime);
59 // TODO(alexclarke): Remove this.
60 virtual void postTimerTask(const blink::WebTraceLocation& location,
61 blink::WebThread::Task* task,
62 double delaySecs);
63 // TODO(alexclarke): Remove this.
64 virtual void postTimerTask(const blink::WebTraceLocation& location,
65 blink::WebThread::Task* task,
66 long long delayMs);
67 52
68 private: 53 private:
69 static void runIdleTask(scoped_ptr<blink::WebThread::IdleTask> task, 54 static void runIdleTask(scoped_ptr<blink::WebThread::IdleTask> task,
70 base::TimeTicks deadline); 55 base::TimeTicks deadline);
71 static void runTask(scoped_ptr<blink::WebThread::Task> task);
72 56
73 ChildScheduler* child_scheduler_; // NOT OWNED 57 ChildScheduler* child_scheduler_; // NOT OWNED
74 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_; 58 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_;
75 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_;
76 scoped_refptr<TaskQueue> timer_task_runner_; 59 scoped_refptr<TaskQueue> timer_task_runner_;
77 scoped_ptr<WebTaskRunnerImpl> loading_web_task_runner_; 60 scoped_ptr<WebTaskRunnerImpl> loading_web_task_runner_;
78 scoped_ptr<WebTaskRunnerImpl> timer_web_task_runner_; 61 scoped_ptr<WebTaskRunnerImpl> timer_web_task_runner_;
79 }; 62 };
80 63
81 } // namespace scheduler 64 } // namespace scheduler
82 65
83 #endif // CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_ 66 #endif // CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « components/html_viewer/web_test_delegate_impl.cc ('k') | components/scheduler/child/web_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698