Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 1371673002: Remove a bunch of provisionalDataSource() usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void WebSharedWorkerImpl::loadShadowPage() 153 void WebSharedWorkerImpl::loadShadowPage()
154 { 154 {
155 // Construct substitute data source for the 'shadow page'. We only need it 155 // Construct substitute data source for the 'shadow page'. We only need it
156 // to have same origin as the worker so the loading checks work correctly. 156 // to have same origin as the worker so the loading checks work correctly.
157 CString content(""); 157 CString content("");
158 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), content.len gth())); 158 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), content.len gth()));
159 m_mainFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_ur l), SubstituteData(buffer, "text/html", "UTF-8", KURL()))); 159 m_mainFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_ur l), SubstituteData(buffer, "text/html", "UTF-8", KURL())));
160 } 160 }
161 161
162 void WebSharedWorkerImpl::willSendRequest( 162 void WebSharedWorkerImpl::willSendRequest(
163 WebLocalFrame* frame, unsigned, WebURLRequest& request, 163 WebDataSource* dataSource, unsigned, WebURLRequest& request,
164 const WebURLResponse& redirectResponse) 164 const WebURLResponse& redirectResponse)
165 { 165 {
166 if (m_networkProvider) 166 if (m_networkProvider)
167 m_networkProvider->willSendRequest(frame->dataSource(), request); 167 m_networkProvider->willSendRequest(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 = WorkerScriptLoader::create(); 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();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698