| 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 // blink::WebThread implementation. | |
| 21 blink::PlatformThreadId threadId() const override; | |
| 22 | |
| 23 // WebThreadBase implementation. | |
| 24 base::SingleThreadTaskRunner* TaskRunner() const override; | |
| 25 | |
| 26 private: | |
| 27 base::MessageLoop* MessageLoop() const override; | |
| 28 | |
| 29 void AddTaskObserverInternal( | |
| 30 base::MessageLoop::TaskObserver* observer) override; | |
| 31 void RemoveTaskObserverInternal( | |
| 32 base::MessageLoop::TaskObserver* observer) override; | |
| 33 | |
| 34 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | |
| 35 RendererScheduler* scheduler_; // Not owned. | |
| 36 blink::PlatformThreadId thread_id_; | |
| 37 }; | |
| 38 | |
| 39 } // namespace content | |
| 40 | |
| 41 #endif // CONTENT_RENDERER_SCHEDULER_WEBTHREAD_IMPL_FOR_SCHEDULER_H_ | |
| OLD | NEW |