| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return adoptPtr(new Loader()); | 82 return adoptPtr(new Loader()); |
| 83 } | 83 } |
| 84 | 84 |
| 85 virtual ~Loader() | 85 virtual ~Loader() |
| 86 { | 86 { |
| 87 m_scriptLoader->setClient(0); | 87 m_scriptLoader->setClient(0); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void load(ExecutionContext* loadingContext, const KURL& scriptURL, const Clo
sure& receiveResponseCallback, const Closure& finishCallback) | 90 void load(ExecutionContext* loadingContext, const KURL& scriptURL, const Clo
sure& receiveResponseCallback, const Closure& finishCallback) |
| 91 { | 91 { |
| 92 ASSERT(loadingContext); |
| 92 m_receiveResponseCallback = receiveResponseCallback; | 93 m_receiveResponseCallback = receiveResponseCallback; |
| 93 m_finishCallback = finishCallback; | 94 m_finishCallback = finishCallback; |
| 94 m_scriptLoader->setTargetType(ResourceRequest::TargetIsSharedWorker); | 95 m_scriptLoader->setTargetType(ResourceRequest::TargetIsSharedWorker); |
| 95 m_scriptLoader->loadAsynchronously( | 96 m_scriptLoader->loadAsynchronously( |
| 96 loadingContext, scriptURL, DenyCrossOriginRequests, this); | 97 *loadingContext, scriptURL, DenyCrossOriginRequests, this); |
| 97 } | 98 } |
| 98 | 99 |
| 99 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re
sponse) OVERRIDE | 100 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re
sponse) OVERRIDE |
| 100 { | 101 { |
| 101 m_identifier = identifier; | 102 m_identifier = identifier; |
| 102 m_appCacheID = response.appCacheID(); | 103 m_appCacheID = response.appCacheID(); |
| 103 m_receiveResponseCallback(); | 104 m_receiveResponseCallback(); |
| 104 } | 105 } |
| 105 | 106 |
| 106 virtual void notifyFinished() OVERRIDE | 107 virtual void notifyFinished() OVERRIDE |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); | 433 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); |
| 433 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); | 434 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); |
| 434 } | 435 } |
| 435 | 436 |
| 436 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 437 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 437 { | 438 { |
| 438 return new WebSharedWorkerImpl(client); | 439 return new WebSharedWorkerImpl(client); |
| 439 } | 440 } |
| 440 | 441 |
| 441 } // namespace blink | 442 } // namespace blink |
| OLD | NEW |