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

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

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors Created 6 years, 6 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 m_mainFrame = WebLocalFrame::create(this); 199 m_mainFrame = WebLocalFrame::create(this);
200 m_webView->setMainFrame(m_mainFrame); 200 m_webView->setMainFrame(m_mainFrame);
201 201
202 WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame()); 202 WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame());
203 203
204 // Construct substitute data source for the 'shadow page'. We only need it 204 // Construct substitute data source for the 'shadow page'. We only need it
205 // to have same origin as the worker so the loading checks work correctly. 205 // to have same origin as the worker so the loading checks work correctly.
206 CString content(""); 206 CString content("");
207 int length = static_cast<int>(content.length()); 207 int length = static_cast<int>(content.length());
208 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length)); 208 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length));
209 webFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(url), S ubstituteData(buffer, "text/html", "UTF-8", KURL()))); 209 ResourceRequest request = ResourceRequest(url, !webFrame->parent());
210 webFrame->frame()->loader().load(FrameLoadRequest(0, request, SubstituteData (buffer, "text/html", "UTF-8", KURL())));
210 } 211 }
211 212
212 WebApplicationCacheHost* WebSharedWorkerImpl::createApplicationCacheHost(WebLoca lFrame*, WebApplicationCacheHostClient* appcacheHostClient) 213 WebApplicationCacheHost* WebSharedWorkerImpl::createApplicationCacheHost(WebLoca lFrame*, WebApplicationCacheHostClient* appcacheHostClient)
213 { 214 {
214 if (client()) 215 if (client())
215 return client()->createApplicationCacheHost(appcacheHostClient); 216 return client()->createApplicationCacheHost(appcacheHostClient);
216 return 0; 217 return 0;
217 } 218 }
218 219
219 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) 220 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame)
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp ectorBackendTask, String(message))); 437 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp ectorBackendTask, String(message)));
437 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); 438 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread());
438 } 439 }
439 440
440 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 441 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
441 { 442 {
442 return new WebSharedWorkerImpl(client); 443 return new WebSharedWorkerImpl(client);
443 } 444 }
444 445
445 } // namespace blink 446 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698