Use a deque in ResourcePool instead of a list.
[chromium-blink-merge.git] / content / utility / webthread_impl_for_utility_thread.h
blob15d7e57fe7dd1a2c2ba1ef4fbdefe1f97cb0a4c8
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.
5 #ifndef CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_
6 #define CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_
8 #include "base/memory/ref_counted.h"
9 #include "components/scheduler/child/webthread_base.h"
11 namespace content {
13 class WebThreadImplForUtilityThread : public scheduler::WebThreadBase {
14 public:
15 WebThreadImplForUtilityThread();
16 ~WebThreadImplForUtilityThread() override;
18 // blink::WebThread implementation.
19 blink::WebScheduler* scheduler() const override;
20 blink::PlatformThreadId threadId() const override;
22 // WebThreadBase implementation.
23 base::SingleThreadTaskRunner* TaskRunner() const override;
24 scheduler::SingleThreadIdleTaskRunner* IdleTaskRunner() const override;
26 private:
27 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
28 blink::PlatformThreadId thread_id_;
30 DISALLOW_COPY_AND_ASSIGN(WebThreadImplForUtilityThread);
33 } // namespace content
35 #endif // CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_