Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_SCHEDULER_WEBTHREAD_IMPL_FOR_SCHEDULER_H_ | |
| 6 #define CONTENT_RENDERER_SCHEDULER_WEBTHREAD_IMPL_FOR_SCHEDULER_H_ | |
| 7 | |
| 8 #include "content/child/webthread_impl.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 class RendererScheduler; | |
| 13 | |
| 14 class WebThreadImplForScheduler : public WebThreadBase { | |
| 15 public: | |
| 16 CONTENT_EXPORT explicit WebThreadImplForScheduler( | |
| 17 RendererScheduler* scheduler); | |
| 18 CONTENT_EXPORT virtual ~WebThreadImplForScheduler(); | |
| 19 | |
| 20 virtual void postTask(const blink::WebTraceLocation& location, Task* task); | |
|
alex clarke (OOO till 29th)
2015/02/13 11:02:07
Maybe add a comment above on the lines of: impleme
Sami
2015/02/13 12:09:09
Done.
| |
| 21 virtual void postDelayedTask(const blink::WebTraceLocation& location, | |
| 22 Task* task, | |
| 23 long long delay_ms); | |
| 24 | |
| 25 // TODO(skyostil): Remove once blink has migrated. | |
| 26 virtual void postTask(Task* task); | |
| 27 virtual void postDelayedTask(Task* task, long long delay_ms); | |
| 28 | |
| 29 virtual void enterRunLoop() override; | |
|
alex clarke (OOO till 29th)
2015/02/13 11:02:07
nit: only one of virtual & override
Sami
2015/02/13 12:09:09
Well spotted. I'll keep this is virtual instead of
| |
| 30 virtual void exitRunLoop() override; | |
| 31 | |
| 32 virtual bool isCurrentThread() const override; | |
|
alex clarke (OOO till 29th)
2015/02/13 11:02:07
Maybe add a comment above on the lines of: impleme
Sami
2015/02/13 12:09:09
Actually these also part of blink::WebThread. I've
| |
| 33 virtual blink::PlatformThreadId threadId() const override; | |
| 34 | |
| 35 private: | |
| 36 void AddTaskObserverInternal( | |
| 37 base::MessageLoop::TaskObserver* observer) override; | |
| 38 void RemoveTaskObserverInternal( | |
| 39 base::MessageLoop::TaskObserver* observer) override; | |
| 40 | |
| 41 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | |
| 42 RendererScheduler* scheduler_; // Not owned. | |
| 43 blink::PlatformThreadId thread_id_; | |
| 44 }; | |
| 45 | |
| 46 } // namespace content | |
| 47 | |
| 48 #endif // CONTENT_RENDERER_SCHEDULER_WEBTHREAD_IMPL_FOR_SCHEDULER_H_ | |
| OLD | NEW |