| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // Not suppported in SharedWorker. | 293 // Not suppported in SharedWorker. |
| 294 } | 294 } |
| 295 | 295 |
| 296 void WebSharedWorkerImpl::reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMes
sage>) | 296 void WebSharedWorkerImpl::reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMes
sage>) |
| 297 { | 297 { |
| 298 // Not supported in SharedWorker. | 298 // Not supported in SharedWorker. |
| 299 } | 299 } |
| 300 | 300 |
| 301 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) | 301 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) |
| 302 { | 302 { |
| 303 toWebLocalFrameImpl(m_mainFrame)->frame()->document()->postInspectorTask(cre
ateCrossThreadTask(&WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread,
this, message)); | 303 toWebLocalFrameImpl(m_mainFrame)->frame()->document()->postInspectorTask(FRO
M_HERE, createCrossThreadTask(&WebSharedWorkerImpl::postMessageToPageInspectorOn
MainThread, this, message)); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(const String& m
essage) | 306 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(const String& m
essage) |
| 307 { | 307 { |
| 308 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy-
>pageInspector(); | 308 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy-
>pageInspector(); |
| 309 if (!pageInspector) | 309 if (!pageInspector) |
| 310 return; | 310 return; |
| 311 pageInspector->dispatchMessageFromWorker(message); | 311 pageInspector->dispatchMessageFromWorker(message); |
| 312 | 312 |
| 313 } | 313 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 339 if (client()) | 339 if (client()) |
| 340 client()->workerContextDestroyed(); | 340 client()->workerContextDestroyed(); |
| 341 // The lifetime of this proxy is controlled by the worker context. | 341 // The lifetime of this proxy is controlled by the worker context. |
| 342 delete this; | 342 delete this; |
| 343 } | 343 } |
| 344 | 344 |
| 345 // WorkerLoaderProxyProvider ---------------------------------------------------
-------- | 345 // WorkerLoaderProxyProvider ---------------------------------------------------
-------- |
| 346 | 346 |
| 347 void WebSharedWorkerImpl::postTaskToLoader(PassOwnPtr<ExecutionContextTask> task
) | 347 void WebSharedWorkerImpl::postTaskToLoader(PassOwnPtr<ExecutionContextTask> task
) |
| 348 { | 348 { |
| 349 toWebLocalFrameImpl(m_mainFrame)->frame()->document()->postTask(task); | 349 toWebLocalFrameImpl(m_mainFrame)->frame()->document()->postTask(FROM_HERE, t
ask); |
| 350 } | 350 } |
| 351 | 351 |
| 352 bool WebSharedWorkerImpl::postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContex
tTask> task) | 352 bool WebSharedWorkerImpl::postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContex
tTask> task) |
| 353 { | 353 { |
| 354 m_workerThread->postTask(task); | 354 m_workerThread->postTask(task); |
| 355 return true; | 355 return true; |
| 356 } | 356 } |
| 357 | 357 |
| 358 void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel) | 358 void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel) |
| 359 { | 359 { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 if (devtoolsAgent) | 473 if (devtoolsAgent) |
| 474 devtoolsAgent->dispatchOnInspectorBackend(message); | 474 devtoolsAgent->dispatchOnInspectorBackend(message); |
| 475 } | 475 } |
| 476 | 476 |
| 477 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 477 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 478 { | 478 { |
| 479 return new WebSharedWorkerImpl(client); | 479 return new WebSharedWorkerImpl(client); |
| 480 } | 480 } |
| 481 | 481 |
| 482 } // namespace blink | 482 } // namespace blink |
| OLD | NEW |