| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); |
| 210 request.initializeForMainResource(!webFrame->parent()); |
| 211 webFrame->frame()->loader().load(FrameLoadRequest(0, request, SubstituteData
(buffer, "text/html", "UTF-8", KURL()))); |
| 210 } | 212 } |
| 211 | 213 |
| 212 WebApplicationCacheHost* WebSharedWorkerImpl::createApplicationCacheHost(WebLoca
lFrame*, WebApplicationCacheHostClient* appcacheHostClient) | 214 WebApplicationCacheHost* WebSharedWorkerImpl::createApplicationCacheHost(WebLoca
lFrame*, WebApplicationCacheHostClient* appcacheHostClient) |
| 213 { | 215 { |
| 214 if (client()) | 216 if (client()) |
| 215 return client()->createApplicationCacheHost(appcacheHostClient); | 217 return client()->createApplicationCacheHost(appcacheHostClient); |
| 216 return 0; | 218 return 0; |
| 217 } | 219 } |
| 218 | 220 |
| 219 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) | 221 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); | 438 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); |
| 437 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); | 439 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); |
| 438 } | 440 } |
| 439 | 441 |
| 440 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 442 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 441 { | 443 { |
| 442 return new WebSharedWorkerImpl(client); | 444 return new WebSharedWorkerImpl(client); |
| 443 } | 445 } |
| 444 | 446 |
| 445 } // namespace blink | 447 } // namespace blink |
| OLD | NEW |