| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 m_loadingShadowPage = false; | 312 m_loadingShadowPage = false; |
| 313 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo
rkProvider(frame->dataSource())); | 313 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo
rkProvider(frame->dataSource())); |
| 314 m_mainScriptLoader = WorkerScriptLoader::create(); | 314 m_mainScriptLoader = WorkerScriptLoader::create(); |
| 315 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo
rker); | 315 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo
rker); |
| 316 m_mainScriptLoader->loadAsynchronously( | 316 m_mainScriptLoader->loadAsynchronously( |
| 317 *m_mainFrame->frame()->document(), | 317 *m_mainFrame->frame()->document(), |
| 318 m_workerStartData.scriptURL, | 318 m_workerStartData.scriptURL, |
| 319 DenyCrossOriginRequests, | 319 DenyCrossOriginRequests, |
| 320 m_mainFrame->frame()->document()->addressSpace(), | 320 m_mainFrame->frame()->document()->addressSpace(), |
| 321 nullptr, | 321 nullptr, |
| 322 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this)); | 322 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, unretained(this))); |
| 323 // Do nothing here since onScriptLoaderFinished() might have been already | 323 // Do nothing here since onScriptLoaderFinished() might have been already |
| 324 // invoked and |this| might have been deleted at this point. | 324 // invoked and |this| might have been deleted at this point. |
| 325 } | 325 } |
| 326 | 326 |
| 327 void WebEmbeddedWorkerImpl::sendProtocolMessage(int sessionId, int callId, const
WebString& message, const WebString& state) | 327 void WebEmbeddedWorkerImpl::sendProtocolMessage(int sessionId, int callId, const
WebString& message, const WebString& state) |
| 328 { | 328 { |
| 329 m_workerContextClient->sendDevToolsMessage(sessionId, callId, message, state
); | 329 m_workerContextClient->sendDevToolsMessage(sessionId, callId, message, state
); |
| 330 } | 330 } |
| 331 | 331 |
| 332 void WebEmbeddedWorkerImpl::resumeStartup() | 332 void WebEmbeddedWorkerImpl::resumeStartup() |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 m_mainScriptLoader.clear(); | 401 m_mainScriptLoader.clear(); |
| 402 | 402 |
| 403 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); | 403 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); |
| 404 m_loaderProxy = WorkerLoaderProxy::create(this); | 404 m_loaderProxy = WorkerLoaderProxy::create(this); |
| 405 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); | 405 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); |
| 406 m_workerThread->start(startupData.release()); | 406 m_workerThread->start(startupData.release()); |
| 407 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); | 407 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); |
| 408 } | 408 } |
| 409 | 409 |
| 410 } // namespace blink | 410 } // namespace blink |
| OLD | NEW |