Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / scheduler / renderer / webthread_impl_for_renderer_scheduler.h
blob104e466faa44751e0d684218b837f081f152ab83
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 COMPONENTS_SCHEDULER_RENDERER_WEBTHREAD_IMPL_FOR_RENDERER_SCHEDULER_H_
6 #define COMPONENTS_SCHEDULER_RENDERER_WEBTHREAD_IMPL_FOR_RENDERER_SCHEDULER_H_
8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "components/scheduler/child/webthread_base.h"
11 namespace blink {
12 class WebScheduler;
15 namespace scheduler {
16 class RendererScheduler;
17 class WebSchedulerImpl;
19 class SCHEDULER_EXPORT WebThreadImplForRendererScheduler
20 : public WebThreadBase {
21 public:
22 explicit WebThreadImplForRendererScheduler(RendererScheduler* scheduler);
23 virtual ~WebThreadImplForRendererScheduler();
25 // blink::WebThread implementation.
26 blink::WebScheduler* scheduler() const;
27 blink::PlatformThreadId threadId() const override;
29 // WebThreadBase implementation.
30 base::SingleThreadTaskRunner* TaskRunner() const override;
31 SingleThreadIdleTaskRunner* IdleTaskRunner() const override;
33 private:
34 void AddTaskObserverInternal(
35 base::MessageLoop::TaskObserver* observer) override;
36 void RemoveTaskObserverInternal(
37 base::MessageLoop::TaskObserver* observer) override;
39 scoped_ptr<WebSchedulerImpl> web_scheduler_;
40 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
41 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_;
42 RendererScheduler* scheduler_; // Not owned.
43 blink::PlatformThreadId thread_id_;
46 } // namespace scheduler
48 #endif // COMPONENTS_SCHEDULER_RENDERER_WEBTHREAD_IMPL_FOR_RENDERER_SCHEDULER_H_