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

Side by Side Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.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) 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Construct substitute data source for the 'shadow page'. We only need it 237 // Construct substitute data source for the 'shadow page'. We only need it
238 // to have same origin as the worker so the loading checks work correctly. 238 // to have same origin as the worker so the loading checks work correctly.
239 CString content(""); 239 CString content("");
240 int length = static_cast<int>(content.length()); 240 int length = static_cast<int>(content.length());
241 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length)); 241 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length));
242 m_loadingShadowPage = true; 242 m_loadingShadowPage = true;
243 m_mainFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_wo rkerStartData.scriptURL), SubstituteData(buffer, "text/html", "UTF-8", KURL()))) ; 243 m_mainFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_wo rkerStartData.scriptURL), SubstituteData(buffer, "text/html", "UTF-8", KURL()))) ;
244 } 244 }
245 245
246 void WebEmbeddedWorkerImpl::willSendRequest( 246 void WebEmbeddedWorkerImpl::willSendRequest(
247 WebLocalFrame* frame, unsigned, WebURLRequest& request, 247 WebDataSource* dataSource, unsigned, WebURLRequest& request,
248 const WebURLResponse& redirectResponse) 248 const WebURLResponse& redirectResponse)
249 { 249 {
250 if (m_networkProvider) 250 if (m_networkProvider)
251 m_networkProvider->willSendRequest(frame->dataSource(), request); 251 m_networkProvider->willSendRequest(dataSource, request);
252 } 252 }
253 253
254 void WebEmbeddedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame, bool) 254 void WebEmbeddedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame, bool)
255 { 255 {
256 ASSERT(!m_mainScriptLoader); 256 ASSERT(!m_mainScriptLoader);
257 ASSERT(!m_networkProvider); 257 ASSERT(!m_networkProvider);
258 ASSERT(m_mainFrame); 258 ASSERT(m_mainFrame);
259 ASSERT(m_workerContextClient); 259 ASSERT(m_workerContextClient);
260 ASSERT(m_loadingShadowPage); 260 ASSERT(m_loadingShadowPage);
261 ASSERT(!m_askedToTerminate); 261 ASSERT(!m_askedToTerminate);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 m_mainScriptLoader.clear(); 346 m_mainScriptLoader.clear();
347 347
348 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 348 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
349 m_loaderProxy = WorkerLoaderProxy::create(this); 349 m_loaderProxy = WorkerLoaderProxy::create(this);
350 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); 350 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy);
351 m_workerThread->start(startupData.release()); 351 m_workerThread->start(startupData.release());
352 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 352 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
353 } 353 }
354 354
355 } // namespace blink 355 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698