| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef WEBKIT_GLUE_WEBTHREAD_IMPL_H_ | 4 #ifndef WEBKIT_GLUE_WEBTHREAD_IMPL_H_ |
| 5 #define WEBKIT_GLUE_WEBTHREAD_IMPL_H_ | 5 #define WEBKIT_GLUE_WEBTHREAD_IMPL_H_ |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 MessageLoop* message_loop() const { return thread_->message_loop(); } | 46 MessageLoop* message_loop() const { return thread_->message_loop(); } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 virtual bool IsCurrentThread() const OVERRIDE; | 49 virtual bool IsCurrentThread() const OVERRIDE; |
| 50 scoped_ptr<base::Thread> thread_; | 50 scoped_ptr<base::Thread> thread_; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 class WebThreadImplForMessageLoop : public WebThreadBase { | 53 class WebThreadImplForMessageLoop : public WebThreadBase { |
| 54 public: | 54 public: |
| 55 explicit WebThreadImplForMessageLoop(base::MessageLoopProxy* message_loop); | 55 WEBKIT_GLUE_EXPORT explicit WebThreadImplForMessageLoop( |
| 56 virtual ~WebThreadImplForMessageLoop(); | 56 base::MessageLoopProxy* message_loop); |
| 57 WEBKIT_GLUE_EXPORT virtual ~WebThreadImplForMessageLoop(); |
| 57 | 58 |
| 58 virtual void postTask(Task* task); | 59 virtual void postTask(Task* task); |
| 59 virtual void postDelayedTask(Task* task, long long delay_ms); | 60 virtual void postDelayedTask(Task* task, long long delay_ms); |
| 60 | 61 |
| 61 virtual void enterRunLoop(); | 62 virtual void enterRunLoop(); |
| 62 virtual void exitRunLoop(); | 63 virtual void exitRunLoop(); |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 virtual bool IsCurrentThread() const OVERRIDE; | 66 virtual bool IsCurrentThread() const OVERRIDE; |
| 66 scoped_refptr<base::MessageLoopProxy> message_loop_; | 67 scoped_refptr<base::MessageLoopProxy> message_loop_; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 } // namespace webkit_glue | 70 } // namespace webkit_glue |
| 70 | 71 |
| 71 #endif | 72 #endif |
| OLD | NEW |