| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 if (isSecureContext) { | 142 if (isSecureContext) { |
| 143 UseCounter::count(document, UseCounter::NonSecureSharedWorkerAcc
essedFromSecureContext); | 143 UseCounter::count(document, UseCounter::NonSecureSharedWorkerAcc
essedFromSecureContext); |
| 144 } else { | 144 } else { |
| 145 UseCounter::count(document, UseCounter::SecureSharedWorkerAccess
edFromNonSecureContext); | 145 UseCounter::count(document, UseCounter::SecureSharedWorkerAccess
edFromNonSecureContext); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 // The connector object manages its own lifecycle (and the lifecycles of the
two worker objects). | 150 // The connector object manages its own lifecycle (and the lifecycles of the
two worker objects). |
| 151 // It will free itself once connecting is completed. | 151 // It will free itself once connecting is completed. |
| 152 SharedWorkerConnector* connector = new SharedWorkerConnector(worker, url, na
me, std::move(port), webWorkerConnector.release()); | 152 SharedWorkerConnector* connector = new SharedWorkerConnector(worker, url, na
me, std::move(port), std::move(webWorkerConnector)); |
| 153 connector->connect(); | 153 connector->connect(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void SharedWorkerRepositoryClientImpl::documentDetached(Document* document) | 156 void SharedWorkerRepositoryClientImpl::documentDetached(Document* document) |
| 157 { | 157 { |
| 158 DCHECK(m_client); | 158 DCHECK(m_client); |
| 159 m_client->documentDetached(getId(document)); | 159 m_client->documentDetached(getId(document)); |
| 160 } | 160 } |
| 161 | 161 |
| 162 SharedWorkerRepositoryClientImpl::SharedWorkerRepositoryClientImpl(WebSharedWork
erRepositoryClient* client) | 162 SharedWorkerRepositoryClientImpl::SharedWorkerRepositoryClientImpl(WebSharedWork
erRepositoryClient* client) |
| 163 : m_client(client) | 163 : m_client(client) |
| 164 { | 164 { |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace blink | 167 } // namespace blink |
| OLD | NEW |