| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "platform/RuntimeEnabledFeatures.h" | 51 #include "platform/RuntimeEnabledFeatures.h" |
| 52 #include "platform/heap/Handle.h" | 52 #include "platform/heap/Handle.h" |
| 53 #include "platform/network/ContentSecurityPolicyParsers.h" | 53 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 54 #include "platform/network/ResourceResponse.h" | 54 #include "platform/network/ResourceResponse.h" |
| 55 #include "platform/weborigin/KURL.h" | 55 #include "platform/weborigin/KURL.h" |
| 56 #include "platform/weborigin/SecurityOrigin.h" | 56 #include "platform/weborigin/SecurityOrigin.h" |
| 57 #include "public/platform/WebFileError.h" | 57 #include "public/platform/WebFileError.h" |
| 58 #include "public/platform/WebMessagePortChannel.h" | 58 #include "public/platform/WebMessagePortChannel.h" |
| 59 #include "public/platform/WebString.h" | 59 #include "public/platform/WebString.h" |
| 60 #include "public/platform/WebURL.h" | 60 #include "public/platform/WebURL.h" |
| 61 #include "public/platform/WebURLRequest.h" |
| 61 #include "public/web/WebFrame.h" | 62 #include "public/web/WebFrame.h" |
| 62 #include "public/web/WebSettings.h" | 63 #include "public/web/WebSettings.h" |
| 63 #include "public/web/WebView.h" | 64 #include "public/web/WebView.h" |
| 64 #include "public/web/WebWorkerPermissionClientProxy.h" | 65 #include "public/web/WebWorkerPermissionClientProxy.h" |
| 65 #include "web/DatabaseClientImpl.h" | 66 #include "web/DatabaseClientImpl.h" |
| 66 #include "web/LocalFileSystemClient.h" | 67 #include "web/LocalFileSystemClient.h" |
| 67 #include "web/WebDataSourceImpl.h" | 68 #include "web/WebDataSourceImpl.h" |
| 68 #include "web/WebLocalFrameImpl.h" | 69 #include "web/WebLocalFrameImpl.h" |
| 69 #include "web/WorkerPermissionClient.h" | 70 #include "web/WorkerPermissionClient.h" |
| 70 #include "wtf/Functional.h" | 71 #include "wtf/Functional.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 85 virtual ~Loader() | 86 virtual ~Loader() |
| 86 { | 87 { |
| 87 m_scriptLoader->setClient(0); | 88 m_scriptLoader->setClient(0); |
| 88 } | 89 } |
| 89 | 90 |
| 90 void load(ExecutionContext* loadingContext, const KURL& scriptURL, const Clo
sure& receiveResponseCallback, const Closure& finishCallback) | 91 void load(ExecutionContext* loadingContext, const KURL& scriptURL, const Clo
sure& receiveResponseCallback, const Closure& finishCallback) |
| 91 { | 92 { |
| 92 ASSERT(loadingContext); | 93 ASSERT(loadingContext); |
| 93 m_receiveResponseCallback = receiveResponseCallback; | 94 m_receiveResponseCallback = receiveResponseCallback; |
| 94 m_finishCallback = finishCallback; | 95 m_finishCallback = finishCallback; |
| 95 m_scriptLoader->setTargetType(ResourceRequest::TargetIsSharedWorker); | 96 m_scriptLoader->setRequestContext(blink::WebURLRequest::RequestContextSh
aredWorker); |
| 96 m_scriptLoader->loadAsynchronously( | 97 m_scriptLoader->loadAsynchronously( |
| 97 *loadingContext, scriptURL, DenyCrossOriginRequests, this); | 98 *loadingContext, scriptURL, DenyCrossOriginRequests, this); |
| 98 } | 99 } |
| 99 | 100 |
| 100 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re
sponse) OVERRIDE | 101 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re
sponse) OVERRIDE |
| 101 { | 102 { |
| 102 m_identifier = identifier; | 103 m_identifier = identifier; |
| 103 m_appCacheID = response.appCacheID(); | 104 m_appCacheID = response.appCacheID(); |
| 104 m_receiveResponseCallback(); | 105 m_receiveResponseCallback(); |
| 105 } | 106 } |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); | 446 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); |
| 446 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); | 447 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); |
| 447 } | 448 } |
| 448 | 449 |
| 449 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 450 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 450 { | 451 { |
| 451 return new WebSharedWorkerImpl(client); | 452 return new WebSharedWorkerImpl(client); |
| 452 } | 453 } |
| 453 | 454 |
| 454 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |