| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ASSERT(loadingContext); |
| 93 m_receiveResponseCallback = receiveResponseCallback; | 93 m_receiveResponseCallback = receiveResponseCallback; |
| 94 m_finishCallback = finishCallback; | 94 m_finishCallback = finishCallback; |
| 95 m_scriptLoader->setRequestContext(WebURLRequest::RequestContextSharedWor
ker); | 95 m_scriptLoader->setRequestContext(WebURLRequest::RequestContextSharedWor
ker); |
| 96 m_scriptLoader->loadAsynchronously( | 96 m_scriptLoader->loadAsynchronously( |
| 97 *loadingContext, scriptURL, DenyCrossOriginRequests, this); | 97 *loadingContext, scriptURL, DenyCrossOriginRequests, this); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re
sponse) OVERRIDE | 100 void didReceiveResponse(unsigned long identifier, const ResourceResponse& re
sponse) override |
| 101 { | 101 { |
| 102 m_identifier = identifier; | 102 m_identifier = identifier; |
| 103 m_appCacheID = response.appCacheID(); | 103 m_appCacheID = response.appCacheID(); |
| 104 m_receiveResponseCallback(); | 104 m_receiveResponseCallback(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 virtual void notifyFinished() OVERRIDE | 107 virtual void notifyFinished() override |
| 108 { | 108 { |
| 109 m_finishCallback(); | 109 m_finishCallback(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void cancel() | 112 void cancel() |
| 113 { | 113 { |
| 114 m_scriptLoader->cancel(); | 114 m_scriptLoader->cancel(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 bool failed() const { return m_scriptLoader->failed(); } | 117 bool failed() const { return m_scriptLoader->failed(); } |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 if (devtoolsAgent) | 460 if (devtoolsAgent) |
| 461 devtoolsAgent->dispatchOnInspectorBackend(message); | 461 devtoolsAgent->dispatchOnInspectorBackend(message); |
| 462 } | 462 } |
| 463 | 463 |
| 464 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 464 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 465 { | 465 { |
| 466 return new WebSharedWorkerImpl(client); | 466 return new WebSharedWorkerImpl(client); |
| 467 } | 467 } |
| 468 | 468 |
| 469 } // namespace blink | 469 } // namespace blink |
| OLD | NEW |