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

Unified Diff: components/scheduler/child/webthread_impl_for_worker_scheduler.h

Issue 1589463002: compositor worker: Use a WebThread for the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self-nits Created 4 years, 11 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 | components/scheduler/child/webthread_impl_for_worker_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/webthread_impl_for_worker_scheduler.h
diff --git a/components/scheduler/child/webthread_impl_for_worker_scheduler.h b/components/scheduler/child/webthread_impl_for_worker_scheduler.h
index a1982379898df9c82ec4b66141dfc8dbab74db7c..37bdff6b870251f529578edd592a81c8b44332d4 100644
--- a/components/scheduler/child/webthread_impl_for_worker_scheduler.h
+++ b/components/scheduler/child/webthread_impl_for_worker_scheduler.h
@@ -33,6 +33,8 @@ class SCHEDULER_EXPORT WebThreadImplForWorkerScheduler
base::Thread::Options options);
~WebThreadImplForWorkerScheduler() override;
+ void Init();
+
// blink::WebThread implementation.
blink::WebScheduler* scheduler() const override;
blink::PlatformThreadId threadId() const override;
@@ -46,6 +48,12 @@ class SCHEDULER_EXPORT WebThreadImplForWorkerScheduler
void WillDestroyCurrentMessageLoop() override;
private:
+ // Returns whether the base::Thread's task-runner should be used as the
+ // default task runner (returns true), or the default task runner from the
+ // scheduler should be used instead (returns false). The default behaviour is
+ // to use the scheduler's default task runner.
+ virtual bool UseThreadTaskRunnerAsDefault() const;
Sami 2016/01/13 17:17:05 This is a dangerous API because tasks will run in
sadrul 2016/01/13 18:29:32 Indeed, that's what I was worried about. A differe
+
void AddTaskObserverInternal(
base::MessageLoop::TaskObserver* observer) override;
void RemoveTaskObserverInternal(
« no previous file with comments | « no previous file | components/scheduler/child/webthread_impl_for_worker_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698