| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(FROM_HERE, t
ask); | 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(FROM_HERE, 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 { |
| 360 workerThread()->postTask( | 360 workerThread()->postTask( |
| 361 createCrossThreadTask(&connectTask, adoptPtr(webChannel))); | 361 FROM_HERE, createCrossThreadTask(&connectTask, adoptPtr(webChannel))); |
| 362 } | 362 } |
| 363 | 363 |
| 364 void WebSharedWorkerImpl::connectTask(ExecutionContext* context, PassOwnPtr<WebM
essagePortChannel> channel) | 364 void WebSharedWorkerImpl::connectTask(ExecutionContext* context, PassOwnPtr<WebM
essagePortChannel> channel) |
| 365 { | 365 { |
| 366 // Wrap the passed-in channel in a MessagePort, and send it off via a connec
t event. | 366 // Wrap the passed-in channel in a MessagePort, and send it off via a connec
t event. |
| 367 RefPtrWillBeRawPtr<MessagePort> port = MessagePort::create(*context); | 367 RefPtrWillBeRawPtr<MessagePort> port = MessagePort::create(*context); |
| 368 port->entangle(channel); | 368 port->entangle(channel); |
| 369 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context); | 369 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context); |
| 370 ASSERT_WITH_SECURITY_IMPLICATION(workerGlobalScope->isSharedWorkerGlobalScop
e()); | 370 ASSERT_WITH_SECURITY_IMPLICATION(workerGlobalScope->isSharedWorkerGlobalScop
e()); |
| 371 workerGlobalScope->dispatchEvent(createConnectEvent(port.release())); | 371 workerGlobalScope->dispatchEvent(createConnectEvent(port.release())); |
| (...skipping 101 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 |