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 WebThreadSupportingGC_h | 5 #ifndef WebThreadSupportingGC_h |
6 #define WebThreadSupportingGC_h | 6 #define WebThreadSupportingGC_h |
7 | 7 |
8 #include "platform/heap/glue/MessageLoopInterruptor.h" | 8 #include "platform/heap/glue/MessageLoopInterruptor.h" |
9 #include "platform/heap/glue/PendingGCRunner.h" | 9 #include "platform/heap/glue/PendingGCRunner.h" |
10 #include "public/platform/Platform.h" | 10 #include "public/platform/Platform.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 void postTask(const WebTraceLocation& location, WebThread::Task* task) | 30 void postTask(const WebTraceLocation& location, WebThread::Task* task) |
31 { | 31 { |
32 m_thread->postTask(location, task); | 32 m_thread->postTask(location, task); |
33 } | 33 } |
34 | 34 |
35 void postDelayedTask(const WebTraceLocation& location, WebThread::Task* task
, long long delayMs) | 35 void postDelayedTask(const WebTraceLocation& location, WebThread::Task* task
, long long delayMs) |
36 { | 36 { |
37 m_thread->postDelayedTask(location, task, delayMs); | 37 m_thread->postDelayedTask(location, task, delayMs); |
38 } | 38 } |
39 | 39 |
| 40 void postIdleTask(const WebTraceLocation& location, WebThread::IdleTask* idl
eTask) |
| 41 { |
| 42 m_thread->postIdleTask(location, idleTask); |
| 43 } |
| 44 |
| 45 void postIdleTaskAfterWakeup(const WebTraceLocation& location, WebThread::Id
leTask* idleTask) |
| 46 { |
| 47 m_thread->postIdleTaskAfterWakeup(location, idleTask); |
| 48 } |
| 49 |
40 bool isCurrentThread() const | 50 bool isCurrentThread() const |
41 { | 51 { |
42 return m_thread->isCurrentThread(); | 52 return m_thread->isCurrentThread(); |
43 } | 53 } |
44 | 54 |
45 void addTaskObserver(WebThread::TaskObserver* observer) | 55 void addTaskObserver(WebThread::TaskObserver* observer) |
46 { | 56 { |
47 m_thread->addTaskObserver(observer); | 57 m_thread->addTaskObserver(observer); |
48 } | 58 } |
49 | 59 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // A WorkerThread might get deleted before it had a chance to properly | 91 // A WorkerThread might get deleted before it had a chance to properly |
82 // shut down. By deleting the WebThread first, we can guarantee that | 92 // shut down. By deleting the WebThread first, we can guarantee that |
83 // no pending tasks on the thread might want to access any of the other | 93 // no pending tasks on the thread might want to access any of the other |
84 // members during the WorkerThread's destruction. | 94 // members during the WorkerThread's destruction. |
85 OwnPtr<WebThread> m_thread; | 95 OwnPtr<WebThread> m_thread; |
86 }; | 96 }; |
87 | 97 |
88 } | 98 } |
89 | 99 |
90 #endif | 100 #endif |
OLD | NEW |