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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 String unusedSecureContextError; |
148 bool isSecureContext = | 148 bool isSecureContext = |
149 worker->getExecutionContext()->isSecureContext(unusedSecureContextError); | 149 worker->getExecutionContext()->isSecureContext(unusedSecureContextError); |
150 std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector = | 150 std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector = |
151 wrapUnique(m_client->createSharedWorkerConnector( | 151 WTF::wrapUnique(m_client->createSharedWorkerConnector( |
152 url, name, getId(document), header, headerType, | 152 url, name, getId(document), header, headerType, |
153 worker->getExecutionContext()->securityContext().addressSpace(), | 153 worker->getExecutionContext()->securityContext().addressSpace(), |
154 isSecureContext ? WebSharedWorkerCreationContextTypeSecure | 154 isSecureContext ? WebSharedWorkerCreationContextTypeSecure |
155 : WebSharedWorkerCreationContextTypeNonsecure, | 155 : WebSharedWorkerCreationContextTypeNonsecure, |
156 &creationError)); | 156 &creationError)); |
157 if (creationError != WebWorkerCreationErrorNone) { | 157 if (creationError != WebWorkerCreationErrorNone) { |
158 if (creationError == WebWorkerCreationErrorURLMismatch) { | 158 if (creationError == WebWorkerCreationErrorURLMismatch) { |
159 // Existing worker does not match this url, so return an error back to the | 159 // Existing worker does not match this url, so return an error back to the |
160 // caller. | 160 // caller. |
161 exceptionState.throwDOMException( | 161 exceptionState.throwDOMException( |
(...skipping 24 matching lines...) Expand all Loading... |
186 void SharedWorkerRepositoryClientImpl::documentDetached(Document* document) { | 186 void SharedWorkerRepositoryClientImpl::documentDetached(Document* document) { |
187 DCHECK(m_client); | 187 DCHECK(m_client); |
188 m_client->documentDetached(getId(document)); | 188 m_client->documentDetached(getId(document)); |
189 } | 189 } |
190 | 190 |
191 SharedWorkerRepositoryClientImpl::SharedWorkerRepositoryClientImpl( | 191 SharedWorkerRepositoryClientImpl::SharedWorkerRepositoryClientImpl( |
192 WebSharedWorkerRepositoryClient* client) | 192 WebSharedWorkerRepositoryClient* client) |
193 : m_client(client) {} | 193 : m_client(client) {} |
194 | 194 |
195 } // namespace blink | 195 } // namespace blink |
OLD | NEW |