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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 if (client()) | 273 if (client()) |
274 client()->workerContextClosed(); | 274 client()->workerContextClosed(); |
275 | 275 |
276 stopWorkerThread(); | 276 stopWorkerThread(); |
277 } | 277 } |
278 | 278 |
279 void WebSharedWorkerImpl::workerGlobalScopeStarted(WorkerGlobalScope*) | 279 void WebSharedWorkerImpl::workerGlobalScopeStarted(WorkerGlobalScope*) |
280 { | 280 { |
281 } | 281 } |
282 | 282 |
283 void WebSharedWorkerImpl::workerGlobalScopeDestroyed() | 283 void WebSharedWorkerImpl::workerThreadTerminated() |
284 { | 284 { |
285 callOnMainThread(bind(&WebSharedWorkerImpl::workerGlobalScopeDestroyedOnMain
Thread, this)); | 285 callOnMainThread(bind(&WebSharedWorkerImpl::workerThreadTerminatedOnMainThre
ad, this)); |
286 } | 286 } |
287 | 287 |
288 void WebSharedWorkerImpl::workerGlobalScopeDestroyedOnMainThread() | 288 void WebSharedWorkerImpl::workerThreadTerminatedOnMainThread() |
289 { | 289 { |
290 if (client()) | 290 if (client()) |
291 client()->workerContextDestroyed(); | 291 client()->workerContextDestroyed(); |
292 // The lifetime of this proxy is controlled by the worker context. | 292 // The lifetime of this proxy is controlled by the worker context. |
293 delete this; | 293 delete this; |
294 } | 294 } |
295 | 295 |
296 // WorkerLoaderProxy ----------------------------------------------------------- | 296 // WorkerLoaderProxy ----------------------------------------------------------- |
297 | 297 |
298 void WebSharedWorkerImpl::postTaskToLoader(PassOwnPtr<ExecutionContextTask> task
) | 298 void WebSharedWorkerImpl::postTaskToLoader(PassOwnPtr<ExecutionContextTask> task
) |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 workerThread()->postDebuggerTask(createCrossThreadTask(dispatchOnInspectorBa
ckendTask, String(message))); | 449 workerThread()->postDebuggerTask(createCrossThreadTask(dispatchOnInspectorBa
ckendTask, String(message))); |
450 workerThread()->interruptAndDispatchInspectorCommands(); | 450 workerThread()->interruptAndDispatchInspectorCommands(); |
451 } | 451 } |
452 | 452 |
453 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 453 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
454 { | 454 { |
455 return new WebSharedWorkerImpl(client); | 455 return new WebSharedWorkerImpl(client); |
456 } | 456 } |
457 | 457 |
458 } // namespace blink | 458 } // namespace blink |
OLD | NEW |