Chromium Code Reviews| Index: content/utility/webthread_impl_for_utility_thread.h |
| diff --git a/content/utility/webthread_impl_for_utility_thread.h b/content/utility/webthread_impl_for_utility_thread.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e7891414bc5f7c9fb62102a75ac8ad80eacec565 |
| --- /dev/null |
| +++ b/content/utility/webthread_impl_for_utility_thread.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_ |
| +#define CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_ |
| + |
| +#include "base/containers/scoped_ptr_hash_map.h" |
|
no sievers
2015/05/11 18:27:14
you mean base/memory/ref_counted.h?
ssid
2015/05/12 09:42:17
sorry, changed.
|
| +#include "components/scheduler/child/webthread_base.h" |
| + |
| +namespace content { |
| + |
| +class WebThreadImplForUtilityThread : public scheduler::WebThreadBase { |
| + public: |
| + WebThreadImplForUtilityThread(); |
| + ~WebThreadImplForUtilityThread() override; |
| + |
| + // blink::WebThread implementation. |
| + blink::WebScheduler* scheduler() const override; |
| + blink::PlatformThreadId threadId() const override; |
| + |
| + // WebThreadBase implementation. |
| + base::SingleThreadTaskRunner* TaskRunner() const override; |
| + scheduler::SingleThreadIdleTaskRunner* IdleTaskRunner() const override; |
| + |
| + private: |
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| + blink::PlatformThreadId thread_id_; |
|
no sievers
2015/05/11 18:27:14
DISALLOW_COPY_AND_ASSIGN
ssid
2015/05/12 09:42:17
Done.
|
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_ |