| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // Not supported in SharedWorker. | 223 // Not supported in SharedWorker. |
| 224 } | 224 } |
| 225 | 225 |
| 226 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) | 226 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) |
| 227 { | 227 { |
| 228 m_mainFrame->frame()->document()->postInspectorTask(BLINK_FROM_HERE, createC
rossThreadTask(&WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread, thi
s, message)); | 228 m_mainFrame->frame()->document()->postInspectorTask(BLINK_FROM_HERE, createC
rossThreadTask(&WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread, thi
s, message)); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(const String& m
essage) | 231 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(const String& m
essage) |
| 232 { | 232 { |
| 233 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy-
>pageInspector(); | 233 m_workerInspectorProxy->dispatchMessageFromWorker(message); |
| 234 if (!pageInspector) | |
| 235 return; | |
| 236 pageInspector->dispatchMessageFromWorker(message); | |
| 237 | |
| 238 } | 234 } |
| 239 | 235 |
| 240 void WebSharedWorkerImpl::workerGlobalScopeClosed() | 236 void WebSharedWorkerImpl::workerGlobalScopeClosed() |
| 241 { | 237 { |
| 242 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_H
ERE, threadSafeBind(&WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread, A
llowCrossThreadAccess(this))); | 238 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_H
ERE, threadSafeBind(&WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread, A
llowCrossThreadAccess(this))); |
| 243 } | 239 } |
| 244 | 240 |
| 245 void WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread() | 241 void WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread() |
| 246 { | 242 { |
| 247 m_client->workerContextClosed(); | 243 m_client->workerContextClosed(); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 if (devtoolsAgent) | 390 if (devtoolsAgent) |
| 395 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message); | 391 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message); |
| 396 } | 392 } |
| 397 | 393 |
| 398 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 394 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 399 { | 395 { |
| 400 return new WebSharedWorkerImpl(client); | 396 return new WebSharedWorkerImpl(client); |
| 401 } | 397 } |
| 402 | 398 |
| 403 } // namespace blink | 399 } // namespace blink |
| OLD | NEW |