| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 void WebSharedWorkerImpl::loadShadowPage() | 154 void WebSharedWorkerImpl::loadShadowPage() |
| 155 { | 155 { |
| 156 // Construct substitute data source for the 'shadow page'. We only need it | 156 // Construct substitute data source for the 'shadow page'. We only need it |
| 157 // to have same origin as the worker so the loading checks work correctly. | 157 // to have same origin as the worker so the loading checks work correctly. |
| 158 CString content(""); | 158 CString content(""); |
| 159 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), content.len
gth())); | 159 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), content.len
gth())); |
| 160 m_mainFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_ur
l), SubstituteData(buffer, "text/html", "UTF-8", KURL()))); | 160 m_mainFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_ur
l), SubstituteData(buffer, "text/html", "UTF-8", KURL()))); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void WebSharedWorkerImpl::willSendRequest( | 163 void WebSharedWorkerImpl::willSendRequest( |
| 164 WebLocalFrame* frame, unsigned, WebURLRequest& request, | 164 WebLocalFrame* frame, WebURLRequest& request) |
| 165 const WebURLResponse& redirectResponse) | |
| 166 { | 165 { |
| 167 if (m_networkProvider) | 166 if (m_networkProvider) |
| 168 m_networkProvider->willSendRequest(frame->dataSource(), request); | 167 m_networkProvider->willSendRequest(frame->dataSource(), request); |
| 169 } | 168 } |
| 170 | 169 |
| 171 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) | 170 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) |
| 172 { | 171 { |
| 173 DCHECK(!m_loadingDocument); | 172 DCHECK(!m_loadingDocument); |
| 174 DCHECK(!m_mainScriptLoader); | 173 DCHECK(!m_mainScriptLoader); |
| 175 m_networkProvider = wrapUnique(m_client->createServiceWorkerNetworkProvider(
frame->dataSource())); | 174 m_networkProvider = wrapUnique(m_client->createServiceWorkerNetworkProvider(
frame->dataSource())); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 if (devtoolsAgent) | 400 if (devtoolsAgent) |
| 402 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); | 401 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); |
| 403 } | 402 } |
| 404 | 403 |
| 405 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 404 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 406 { | 405 { |
| 407 return new WebSharedWorkerImpl(client); | 406 return new WebSharedWorkerImpl(client); |
| 408 } | 407 } |
| 409 | 408 |
| 410 } // namespace blink | 409 } // namespace blink |
| OLD | NEW |