| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // WorkerLoaderProxyProvider ---------------------------------------------------
-------- | 271 // WorkerLoaderProxyProvider ---------------------------------------------------
-------- |
| 272 | 272 |
| 273 void WebSharedWorkerImpl::postTaskToLoader(const WebTraceLocation& location, std
::unique_ptr<ExecutionContextTask> task) | 273 void WebSharedWorkerImpl::postTaskToLoader(const WebTraceLocation& location, std
::unique_ptr<ExecutionContextTask> task) |
| 274 { | 274 { |
| 275 // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and | 275 // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and |
| 276 // consider using m_mainThreadTaskRunners->get(TaskType::Networking) | 276 // consider using m_mainThreadTaskRunners->get(TaskType::Networking) |
| 277 // instead. | 277 // instead. |
| 278 m_mainFrame->frame()->document()->postTask(location, std::move(task)); | 278 m_mainFrame->frame()->document()->postTask(location, std::move(task)); |
| 279 } | 279 } |
| 280 | 280 |
| 281 bool WebSharedWorkerImpl::postTaskToWorkerGlobalScope(const WebTraceLocation& lo
cation, std::unique_ptr<ExecutionContextTask> task) | 281 void WebSharedWorkerImpl::postTaskToWorkerGlobalScope(const WebTraceLocation& lo
cation, std::unique_ptr<ExecutionContextTask> task) |
| 282 { | 282 { |
| 283 m_workerThread->postTask(location, std::move(task)); | 283 m_workerThread->postTask(location, std::move(task)); |
| 284 return true; | |
| 285 } | 284 } |
| 286 | 285 |
| 287 void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel) | 286 void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel) |
| 288 { | 287 { |
| 289 workerThread()->postTask( | 288 workerThread()->postTask( |
| 290 BLINK_FROM_HERE, createCrossThreadTask(&connectTask, passed(WebMessagePo
rtChannelUniquePtr(webChannel)))); | 289 BLINK_FROM_HERE, createCrossThreadTask(&connectTask, passed(WebMessagePo
rtChannelUniquePtr(webChannel)))); |
| 291 } | 290 } |
| 292 | 291 |
| 293 void WebSharedWorkerImpl::connectTask(WebMessagePortChannelUniquePtr channel, Ex
ecutionContext* context) | 292 void WebSharedWorkerImpl::connectTask(WebMessagePortChannelUniquePtr channel, Ex
ecutionContext* context) |
| 294 { | 293 { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 if (devtoolsAgent) | 411 if (devtoolsAgent) |
| 413 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); | 412 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); |
| 414 } | 413 } |
| 415 | 414 |
| 416 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 415 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 417 { | 416 { |
| 418 return new WebSharedWorkerImpl(client); | 417 return new WebSharedWorkerImpl(client); |
| 419 } | 418 } |
| 420 | 419 |
| 421 } // namespace blink | 420 } // namespace blink |
| OLD | NEW |