| 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_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_ | |
| 6 #define CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "components/scheduler/child/webthread_base.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 class WebThreadImplForUtilityThread : public scheduler::WebThreadBase { | |
| 15 public: | |
| 16 WebThreadImplForUtilityThread(); | |
| 17 ~WebThreadImplForUtilityThread() override; | |
| 18 | |
| 19 // blink::WebThread implementation. | |
| 20 blink::WebScheduler* scheduler() const override; | |
| 21 blink::PlatformThreadId threadId() const override; | |
| 22 | |
| 23 // WebThreadBase implementation. | |
| 24 base::SingleThreadTaskRunner* GetTaskRunner() const override; | |
| 25 scheduler::SingleThreadIdleTaskRunner* GetIdleTaskRunner() const override; | |
| 26 | |
| 27 private: | |
| 28 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | |
| 29 blink::PlatformThreadId thread_id_; | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(WebThreadImplForUtilityThread); | |
| 32 }; | |
| 33 | |
| 34 } // namespace content | |
| 35 | |
| 36 #endif // CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_ | |
| OLD | NEW |