Chromium Code Reviews| 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( |