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 MOJO_EXAMPLES_HTML_VIEWER_WEBTHREAD_IMPL_H_ | 5 #ifndef MOJO_SERVICES_HTML_VIEWER_WEBTHREAD_IMPL_H_ |
6 #define MOJO_EXAMPLES_HTML_VIEWER_WEBTHREAD_IMPL_H_ | 6 #define MOJO_SERVICES_HTML_VIEWER_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" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #include "third_party/WebKit/public/platform/WebThread.h" | 12 #include "third_party/WebKit/public/platform/WebThread.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace examples { | |
16 | 15 |
17 class WebThreadBase : public blink::WebThread { | 16 class WebThreadBase : public blink::WebThread { |
18 public: | 17 public: |
19 virtual ~WebThreadBase(); | 18 virtual ~WebThreadBase(); |
20 | 19 |
21 virtual void addTaskObserver(TaskObserver* observer); | 20 virtual void addTaskObserver(TaskObserver* observer); |
22 virtual void removeTaskObserver(TaskObserver* observer); | 21 virtual void removeTaskObserver(TaskObserver* observer); |
23 | 22 |
24 virtual bool isCurrentThread() const = 0; | 23 virtual bool isCurrentThread() const = 0; |
25 | 24 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual void postDelayedTask(Task* task, long long delay_ms); | 61 virtual void postDelayedTask(Task* task, long long delay_ms); |
63 | 62 |
64 virtual void enterRunLoop(); | 63 virtual void enterRunLoop(); |
65 virtual void exitRunLoop(); | 64 virtual void exitRunLoop(); |
66 | 65 |
67 private: | 66 private: |
68 virtual bool isCurrentThread() const; | 67 virtual bool isCurrentThread() const; |
69 scoped_refptr<base::MessageLoopProxy> message_loop_; | 68 scoped_refptr<base::MessageLoopProxy> message_loop_; |
70 }; | 69 }; |
71 | 70 |
72 } // namespace examples | |
73 } // namespace mojo | 71 } // namespace mojo |
74 | 72 |
75 #endif // MOJO_EXAMPLES_HTML_VIEWER_WEBTHREAD_IMPL_H_ | 73 #endif // MOJO_SERVICES_HTML_VIEWER_WEBTHREAD_IMPL_H_ |
OLD | NEW |