ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / content / renderer / scheduler / webthread_impl_for_scheduler.h
blob36bd2e2a2e7f004a57c273c180520b7b36e65522
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_RENDERER_SCHEDULER_WEBTHREAD_IMPL_FOR_SCHEDULER_H_
6 #define CONTENT_RENDERER_SCHEDULER_WEBTHREAD_IMPL_FOR_SCHEDULER_H_
8 #include "content/child/webthread_impl.h"
10 #include "base/containers/scoped_ptr_hash_map.h"
12 namespace content {
14 class RendererScheduler;
16 class CONTENT_EXPORT WebThreadImplForScheduler : public WebThreadBase {
17 public:
18 explicit WebThreadImplForScheduler(RendererScheduler* scheduler);
19 virtual ~WebThreadImplForScheduler();
21 // blink::WebThread implementation.
22 blink::PlatformThreadId threadId() const override;
24 // WebThreadBase implementation.
25 base::SingleThreadTaskRunner* TaskRunner() const override;
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;
34 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
35 RendererScheduler* scheduler_; // Not owned.
36 blink::PlatformThreadId thread_id_;
39 } // namespace content
41 #endif // CONTENT_RENDERER_SCHEDULER_WEBTHREAD_IMPL_FOR_SCHEDULER_H_