OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_CHILD_WEBTHREAD_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEBTHREAD_IMPL_H_ |
6 #define CONTENT_CHILD_WEBTHREAD_IMPL_H_ | 6 #define CONTENT_CHILD_WEBTHREAD_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 // WebThreadBase implementation. | 74 // WebThreadBase implementation. |
75 base::SingleThreadTaskRunner* TaskRunner() const override; | 75 base::SingleThreadTaskRunner* TaskRunner() const override; |
76 | 76 |
77 private: | 77 private: |
78 base::MessageLoop* MessageLoop() const override; | 78 base::MessageLoop* MessageLoop() const override; |
79 | 79 |
80 scoped_ptr<base::Thread> thread_; | 80 scoped_ptr<base::Thread> thread_; |
81 }; | 81 }; |
82 | 82 |
83 class WebThreadImplForMessageLoop : public WebThreadBase { | |
84 public: | |
85 CONTENT_EXPORT explicit WebThreadImplForMessageLoop( | |
86 scoped_refptr<base::SingleThreadTaskRunner> owning_thread_task_runner); | |
87 CONTENT_EXPORT virtual ~WebThreadImplForMessageLoop(); | |
88 | |
89 // blink::WebThread implementation. | |
90 blink::PlatformThreadId threadId() const override; | |
91 | |
92 // WebThreadBase implementation. | |
93 base::MessageLoop* MessageLoop() const override; | |
94 | |
95 private: | |
96 base::SingleThreadTaskRunner* TaskRunner() const override; | |
97 | |
98 scoped_refptr<base::SingleThreadTaskRunner> owning_thread_task_runner_; | |
99 blink::PlatformThreadId thread_id_; | |
100 }; | |
101 | |
102 } // namespace content | 83 } // namespace content |
103 | 84 |
104 #endif // CONTENT_CHILD_WEBTHREAD_IMPL_H_ | 85 #endif // CONTENT_CHILD_WEBTHREAD_IMPL_H_ |
OLD | NEW |