| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 WebString header; | 137 WebString header; |
| 138 WebContentSecurityPolicyType headerType = WebContentSecurityPolicyTypeReport; | 138 WebContentSecurityPolicyType headerType = WebContentSecurityPolicyTypeReport; |
| 139 | 139 |
| 140 if (headers->size() > 0) { | 140 if (headers->size() > 0) { |
| 141 header = (*headers)[0].first; | 141 header = (*headers)[0].first; |
| 142 headerType = | 142 headerType = |
| 143 static_cast<WebContentSecurityPolicyType>((*headers)[0].second); | 143 static_cast<WebContentSecurityPolicyType>((*headers)[0].second); |
| 144 } | 144 } |
| 145 | 145 |
| 146 WebWorkerCreationError creationError; | 146 WebWorkerCreationError creationError; |
| 147 String unusedSecureContextError; | 147 bool isSecureContext = worker->getExecutionContext()->isSecureContext(); |
| 148 bool isSecureContext = | |
| 149 worker->getExecutionContext()->isSecureContext(unusedSecureContextError); | |
| 150 std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector = | 148 std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector = |
| 151 WTF::wrapUnique(m_client->createSharedWorkerConnector( | 149 WTF::wrapUnique(m_client->createSharedWorkerConnector( |
| 152 url, name, getId(document), header, headerType, | 150 url, name, getId(document), header, headerType, |
| 153 worker->getExecutionContext()->securityContext().addressSpace(), | 151 worker->getExecutionContext()->securityContext().addressSpace(), |
| 154 isSecureContext ? WebSharedWorkerCreationContextTypeSecure | 152 isSecureContext ? WebSharedWorkerCreationContextTypeSecure |
| 155 : WebSharedWorkerCreationContextTypeNonsecure, | 153 : WebSharedWorkerCreationContextTypeNonsecure, |
| 156 &creationError)); | 154 &creationError)); |
| 157 if (creationError != WebWorkerCreationErrorNone) { | 155 if (creationError != WebWorkerCreationErrorNone) { |
| 158 if (creationError == WebWorkerCreationErrorURLMismatch) { | 156 if (creationError == WebWorkerCreationErrorURLMismatch) { |
| 159 // Existing worker does not match this url, so return an error back to the | 157 // Existing worker does not match this url, so return an error back to the |
| (...skipping 26 matching lines...) Expand all Loading... |
| 186 void SharedWorkerRepositoryClientImpl::documentDetached(Document* document) { | 184 void SharedWorkerRepositoryClientImpl::documentDetached(Document* document) { |
| 187 DCHECK(m_client); | 185 DCHECK(m_client); |
| 188 m_client->documentDetached(getId(document)); | 186 m_client->documentDetached(getId(document)); |
| 189 } | 187 } |
| 190 | 188 |
| 191 SharedWorkerRepositoryClientImpl::SharedWorkerRepositoryClientImpl( | 189 SharedWorkerRepositoryClientImpl::SharedWorkerRepositoryClientImpl( |
| 192 WebSharedWorkerRepositoryClient* client) | 190 WebSharedWorkerRepositoryClient* client) |
| 193 : m_client(client) {} | 191 : m_client(client) {} |
| 194 | 192 |
| 195 } // namespace blink | 193 } // namespace blink |
| OLD | NEW |