| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG
lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart; | 248 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG
lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart; |
| 249 OwnPtr<WorkerClients> workerClients = WorkerClients::create(); | 249 OwnPtr<WorkerClients> workerClients = WorkerClients::create(); |
| 250 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c
reate()); | 250 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c
reate()); |
| 251 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat
e()); | 251 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat
e()); |
| 252 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); | 252 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); |
| 253 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea
teWorkerPermissionClientProxy(webSecurityOrigin))); | 253 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea
teWorkerPermissionClientProxy(webSecurityOrigin))); |
| 254 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat
e(url, userAgent, sourceCode, startMode, contentSecurityPolicy, static_cast<WebC
ore::ContentSecurityPolicy::HeaderType>(policyType), workerClients.release()); | 254 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat
e(url, userAgent, sourceCode, startMode, contentSecurityPolicy, static_cast<WebC
ore::ContentSecurityPolicy::HeaderType>(policyType), workerClients.release()); |
| 255 setWorkerThread(SharedWorkerThread::create(name, *this, *this, startupData.r
elease())); | 255 setWorkerThread(SharedWorkerThread::create(name, *this, *this, startupData.r
elease())); |
| 256 | 256 |
| 257 workerThread()->start(); | 257 workerThread()->start(); |
| 258 // FIXME(horo): This call will be moved when we implement script loading in
WebSharedWorkerImpl. |
| 259 if (client()) |
| 260 client()->workerScriptLoaded(); |
| 258 } | 261 } |
| 259 | 262 |
| 260 void WebSharedWorkerImpl::terminateWorkerContext() | 263 void WebSharedWorkerImpl::terminateWorkerContext() |
| 261 { | 264 { |
| 262 stopWorkerThread(); | 265 stopWorkerThread(); |
| 263 } | 266 } |
| 264 | 267 |
| 265 void WebSharedWorkerImpl::clientDestroyed() | 268 void WebSharedWorkerImpl::clientDestroyed() |
| 266 { | 269 { |
| 267 m_client.clear(); | 270 m_client.clear(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 workerThread()->runLoop().postTaskForMode(createCallbackTask(dispatchOnInspe
ctorBackendTask, String(message)), WorkerDebuggerAgent::debuggerTaskMode); | 329 workerThread()->runLoop().postTaskForMode(createCallbackTask(dispatchOnInspe
ctorBackendTask, String(message)), WorkerDebuggerAgent::debuggerTaskMode); |
| 327 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); | 330 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); |
| 328 } | 331 } |
| 329 | 332 |
| 330 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 333 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 331 { | 334 { |
| 332 return new WebSharedWorkerImpl(client); | 335 return new WebSharedWorkerImpl(client); |
| 333 } | 336 } |
| 334 | 337 |
| 335 } // namespace blink | 338 } // namespace blink |
| OLD | NEW |