| 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 #include "base/containers/scoped_ptr_hash_map.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 class RendererScheduler; | |
| 15 | |
| 16 class CONTENT_EXPORT WebThreadImplForScheduler : public WebThreadBase { | |
| 17 public: | |
| 18 explicit WebThreadImplForScheduler(RendererScheduler* scheduler); | |
| 19 virtual ~WebThreadImplForScheduler(); | |
| 20 | |
| 21 // blink::WebThread implementation. | |
| 22 blink::PlatformThreadId threadId() const override; | |
| 23 | |
| 24 // WebThreadBase implementation. | |
| 25 base::SingleThreadTaskRunner* TaskRunner() const override; | |
| 26 | |
| 27 private: | |
| 28 base::MessageLoop* MessageLoop() const override; | |
| 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 |