| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 { | 165 { |
| 166 if (m_networkProvider) | 166 if (m_networkProvider) |
| 167 m_networkProvider->willSendRequest(frame->dataSource(), request); | 167 m_networkProvider->willSendRequest(frame->dataSource(), request); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame, bool) | 170 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame, bool) |
| 171 { | 171 { |
| 172 ASSERT(!m_loadingDocument); | 172 ASSERT(!m_loadingDocument); |
| 173 ASSERT(!m_mainScriptLoader); | 173 ASSERT(!m_mainScriptLoader); |
| 174 m_networkProvider = adoptPtr(m_client->createServiceWorkerNetworkProvider(fr
ame->dataSource())); | 174 m_networkProvider = adoptPtr(m_client->createServiceWorkerNetworkProvider(fr
ame->dataSource())); |
| 175 m_mainScriptLoader = adoptPtr(new WorkerScriptLoader()); | 175 m_mainScriptLoader = WorkerScriptLoader::create(); |
| 176 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextSharedWor
ker); | 176 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextSharedWor
ker); |
| 177 m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document(); | 177 m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document(); |
| 178 m_mainScriptLoader->loadAsynchronously( | 178 m_mainScriptLoader->loadAsynchronously( |
| 179 *m_loadingDocument.get(), | 179 *m_loadingDocument.get(), |
| 180 m_url, | 180 m_url, |
| 181 DenyCrossOriginRequests, | 181 DenyCrossOriginRequests, |
| 182 bind(&WebSharedWorkerImpl::didReceiveScriptLoaderResponse, this), | 182 bind(&WebSharedWorkerImpl::didReceiveScriptLoaderResponse, this), |
| 183 bind(&WebSharedWorkerImpl::onScriptLoaderFinished, this)); | 183 bind(&WebSharedWorkerImpl::onScriptLoaderFinished, this)); |
| 184 // Do nothing here since onScriptLoaderFinished() might have been already | 184 // Do nothing here since onScriptLoaderFinished() might have been already |
| 185 // invoked and |this| might have been deleted at this point. | 185 // invoked and |this| might have been deleted at this point. |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 if (devtoolsAgent) | 394 if (devtoolsAgent) |
| 395 devtoolsAgent->dispatchOnInspectorBackend(message); | 395 devtoolsAgent->dispatchOnInspectorBackend(message); |
| 396 } | 396 } |
| 397 | 397 |
| 398 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 398 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 399 { | 399 { |
| 400 return new WebSharedWorkerImpl(client); | 400 return new WebSharedWorkerImpl(client); |
| 401 } | 401 } |
| 402 | 402 |
| 403 } // namespace blink | 403 } // namespace blink |
| OLD | NEW |