| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual bool isCurrentThread() const override; | 50 virtual bool isCurrentThread() const override; |
| 51 virtual blink::PlatformThreadId threadId() const override; | 51 virtual blink::PlatformThreadId threadId() const override; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 scoped_ptr<base::Thread> thread_; | 54 scoped_ptr<base::Thread> thread_; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 class WebThreadImplForMessageLoop : public WebThreadBase { | 57 class WebThreadImplForMessageLoop : public WebThreadBase { |
| 58 public: | 58 public: |
| 59 CONTENT_EXPORT explicit WebThreadImplForMessageLoop( | 59 CONTENT_EXPORT explicit WebThreadImplForMessageLoop( |
| 60 base::MessageLoopProxy* message_loop); | 60 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); |
| 61 CONTENT_EXPORT virtual ~WebThreadImplForMessageLoop(); | 61 CONTENT_EXPORT virtual ~WebThreadImplForMessageLoop(); |
| 62 | 62 |
| 63 virtual void postTask(Task* task) override; | 63 virtual void postTask(Task* task) override; |
| 64 virtual void postDelayedTask(Task* task, long long delay_ms) override; | 64 virtual void postDelayedTask(Task* task, long long delay_ms) override; |
| 65 | 65 |
| 66 virtual void enterRunLoop() override; | 66 virtual void enterRunLoop() override; |
| 67 virtual void exitRunLoop() override; | 67 virtual void exitRunLoop() override; |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 virtual bool isCurrentThread() const override; | 70 virtual bool isCurrentThread() const override; |
| 71 virtual blink::PlatformThreadId threadId() const override; | 71 virtual blink::PlatformThreadId threadId() const override; |
| 72 | 72 |
| 73 scoped_refptr<base::MessageLoopProxy> message_loop_; | 73 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 74 blink::PlatformThreadId thread_id_; | 74 blink::PlatformThreadId thread_id_; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace content | 77 } // namespace content |
| 78 | 78 |
| 79 #endif // CONTENT_CHILD_WEBTHREAD_IMPL_H_ | 79 #endif // CONTENT_CHILD_WEBTHREAD_IMPL_H_ |
| OLD | NEW |