| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 ASSERT(m_loadingShadowPage); | 285 ASSERT(m_loadingShadowPage); |
| 286 ASSERT(!m_askedToTerminate); | 286 ASSERT(!m_askedToTerminate); |
| 287 m_loadingShadowPage = false; | 287 m_loadingShadowPage = false; |
| 288 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo
rkProvider(frame->dataSource())); | 288 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo
rkProvider(frame->dataSource())); |
| 289 m_mainScriptLoader = WorkerScriptLoader::create(); | 289 m_mainScriptLoader = WorkerScriptLoader::create(); |
| 290 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo
rker); | 290 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo
rker); |
| 291 m_mainScriptLoader->loadAsynchronously( | 291 m_mainScriptLoader->loadAsynchronously( |
| 292 *m_mainFrame->frame()->document(), | 292 *m_mainFrame->frame()->document(), |
| 293 m_workerStartData.scriptURL, | 293 m_workerStartData.scriptURL, |
| 294 DenyCrossOriginRequests, | 294 DenyCrossOriginRequests, |
| 295 m_mainFrame->frame()->document()->addressSpace(), |
| 295 nullptr, | 296 nullptr, |
| 296 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this)); | 297 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this)); |
| 297 // Do nothing here since onScriptLoaderFinished() might have been already | 298 // Do nothing here since onScriptLoaderFinished() might have been already |
| 298 // invoked and |this| might have been deleted at this point. | 299 // invoked and |this| might have been deleted at this point. |
| 299 } | 300 } |
| 300 | 301 |
| 301 void WebEmbeddedWorkerImpl::sendProtocolMessage(int sessionId, int callId, const
WebString& message, const WebString& state) | 302 void WebEmbeddedWorkerImpl::sendProtocolMessage(int sessionId, int callId, const
WebString& message, const WebString& state) |
| 302 { | 303 { |
| 303 m_workerContextClient->sendDevToolsMessage(sessionId, callId, message, state
); | 304 m_workerContextClient->sendDevToolsMessage(sessionId, callId, message, state
); |
| 304 } | 305 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 m_mainScriptLoader.clear(); | 375 m_mainScriptLoader.clear(); |
| 375 | 376 |
| 376 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); | 377 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); |
| 377 m_loaderProxy = WorkerLoaderProxy::create(this); | 378 m_loaderProxy = WorkerLoaderProxy::create(this); |
| 378 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); | 379 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); |
| 379 m_workerThread->start(startupData.release()); | 380 m_workerThread->start(startupData.release()); |
| 380 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); | 381 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); |
| 381 } | 382 } |
| 382 | 383 |
| 383 } // namespace blink | 384 } // namespace blink |
| OLD | NEW |