OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 PassOwnPtr<WorkerObjectProxy> WorkerObjectProxy::create(ExecutionContext* execut
ionContext, WorkerMessagingProxy* messagingProxy) | 42 PassOwnPtr<WorkerObjectProxy> WorkerObjectProxy::create(ExecutionContext* execut
ionContext, WorkerMessagingProxy* messagingProxy) |
43 { | 43 { |
44 return adoptPtr(new WorkerObjectProxy(executionContext, messagingProxy)); | 44 return adoptPtr(new WorkerObjectProxy(executionContext, messagingProxy)); |
45 } | 45 } |
46 | 46 |
47 void WorkerObjectProxy::postMessageToWorkerObject(PassRefPtr<SerializedScriptVal
ue> message, PassOwnPtr<MessagePortChannelArray> channels) | 47 void WorkerObjectProxy::postMessageToWorkerObject(PassRefPtr<SerializedScriptVal
ue> message, PassOwnPtr<MessagePortChannelArray> channels) |
48 { | 48 { |
49 m_executionContext->postTask(bind(&WorkerMessagingProxy::postMessageToWorker
Object, m_messagingProxy, message, channels)); | 49 m_executionContext->postTask(bind(&WorkerMessagingProxy::postMessageToWorker
Object, m_messagingProxy, message, channels)); |
50 } | 50 } |
51 | 51 |
| 52 void WorkerObjectProxy::postTaskToMainExecutionContext(PassOwnPtr<ExecutionConte
xtTask> task) |
| 53 { |
| 54 m_executionContext->postTask(task); |
| 55 } |
| 56 |
52 void WorkerObjectProxy::confirmMessageFromWorkerObject(bool hasPendingActivity) | 57 void WorkerObjectProxy::confirmMessageFromWorkerObject(bool hasPendingActivity) |
53 { | 58 { |
54 m_executionContext->postTask(bind(&WorkerMessagingProxy::confirmMessageFromW
orkerObject, m_messagingProxy, hasPendingActivity)); | 59 m_executionContext->postTask(bind(&WorkerMessagingProxy::confirmMessageFromW
orkerObject, m_messagingProxy, hasPendingActivity)); |
55 } | 60 } |
56 | 61 |
57 void WorkerObjectProxy::reportPendingActivity(bool hasPendingActivity) | 62 void WorkerObjectProxy::reportPendingActivity(bool hasPendingActivity) |
58 { | 63 { |
59 m_executionContext->postTask(bind(&WorkerMessagingProxy::reportPendingActivi
ty, m_messagingProxy, hasPendingActivity)); | 64 m_executionContext->postTask(bind(&WorkerMessagingProxy::reportPendingActivi
ty, m_messagingProxy, hasPendingActivity)); |
60 } | 65 } |
61 | 66 |
(...skipping 28 matching lines...) Expand all Loading... |
90 m_executionContext->postTask(bind(&WorkerMessagingProxy::workerGlobalScopeDe
stroyed, m_messagingProxy)); | 95 m_executionContext->postTask(bind(&WorkerMessagingProxy::workerGlobalScopeDe
stroyed, m_messagingProxy)); |
91 } | 96 } |
92 | 97 |
93 WorkerObjectProxy::WorkerObjectProxy(ExecutionContext* executionContext, WorkerM
essagingProxy* messagingProxy) | 98 WorkerObjectProxy::WorkerObjectProxy(ExecutionContext* executionContext, WorkerM
essagingProxy* messagingProxy) |
94 : m_executionContext(executionContext) | 99 : m_executionContext(executionContext) |
95 , m_messagingProxy(messagingProxy) | 100 , m_messagingProxy(messagingProxy) |
96 { | 101 { |
97 } | 102 } |
98 | 103 |
99 } // namespace WebCore | 104 } // namespace WebCore |
OLD | NEW |