| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 void WorkerObjectProxy::confirmMessageFromWorkerObject(bool hasPendingActivity) | 60 void WorkerObjectProxy::confirmMessageFromWorkerObject(bool hasPendingActivity) |
| 61 { | 61 { |
| 62 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::co
nfirmMessageFromWorkerObject, m_messagingProxy, hasPendingActivity)); | 62 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::co
nfirmMessageFromWorkerObject, m_messagingProxy, hasPendingActivity)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void WorkerObjectProxy::reportPendingActivity(bool hasPendingActivity) | 65 void WorkerObjectProxy::reportPendingActivity(bool hasPendingActivity) |
| 66 { | 66 { |
| 67 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::re
portPendingActivity, m_messagingProxy, hasPendingActivity)); | 67 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::re
portPendingActivity, m_messagingProxy, hasPendingActivity)); |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool WorkerObjectProxy::isWorkerGlobalScope() const |
| 71 { |
| 72 return m_executionContext && m_executionContext->isWorkerGlobalScope(); |
| 73 } |
| 74 |
| 75 bool WorkerObjectProxy::isSharedWorkerGlobalScope() const |
| 76 { |
| 77 return m_executionContext && m_executionContext->isSharedWorkerGlobalScope()
; |
| 78 } |
| 79 |
| 80 bool WorkerObjectProxy::isDedicatedWorkerGlobalScope() const |
| 81 { |
| 82 return m_executionContext && m_executionContext->isDedicatedWorkerGlobalScop
e(); |
| 83 } |
| 84 |
| 85 bool WorkerObjectProxy::isServiceWorkerGlobalScope() const |
| 86 { |
| 87 return m_executionContext && m_executionContext->isServiceWorkerGlobalScope(
); |
| 88 } |
| 89 |
| 90 bool WorkerObjectProxy::isUIWorkerObjectProxy() const |
| 91 { |
| 92 return m_executionContext && m_executionContext->isUIWorkerGlobalScope(); |
| 93 } |
| 94 |
| 70 void WorkerObjectProxy::reportException(const String& errorMessage, int lineNumb
er, int columnNumber, const String& sourceURL) | 95 void WorkerObjectProxy::reportException(const String& errorMessage, int lineNumb
er, int columnNumber, const String& sourceURL) |
| 71 { | 96 { |
| 72 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::re
portException, m_messagingProxy, errorMessage, lineNumber, columnNumber, sourceU
RL)); | 97 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::re
portException, m_messagingProxy, errorMessage, lineNumber, columnNumber, sourceU
RL)); |
| 73 } | 98 } |
| 74 | 99 |
| 75 void WorkerObjectProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessa
ge> consoleMessage) | 100 void WorkerObjectProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessa
ge> consoleMessage) |
| 76 { | 101 { |
| 77 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::re
portConsoleMessage, m_messagingProxy, consoleMessage->source(), consoleMessage->
level(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage
->url())); | 102 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::re
portConsoleMessage, m_messagingProxy, consoleMessage->source(), consoleMessage->
level(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage
->url())); |
| 78 } | 103 } |
| 79 | 104 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 94 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::wo
rkerThreadTerminated, m_messagingProxy)); | 119 m_executionContext->postTask(createCrossThreadTask(&WorkerMessagingProxy::wo
rkerThreadTerminated, m_messagingProxy)); |
| 95 } | 120 } |
| 96 | 121 |
| 97 WorkerObjectProxy::WorkerObjectProxy(ExecutionContext* executionContext, WorkerM
essagingProxy* messagingProxy) | 122 WorkerObjectProxy::WorkerObjectProxy(ExecutionContext* executionContext, WorkerM
essagingProxy* messagingProxy) |
| 98 : m_executionContext(executionContext) | 123 : m_executionContext(executionContext) |
| 99 , m_messagingProxy(messagingProxy) | 124 , m_messagingProxy(messagingProxy) |
| 100 { | 125 { |
| 101 } | 126 } |
| 102 | 127 |
| 103 } // namespace blink | 128 } // namespace blink |
| OLD | NEW |