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