| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 WTF_MAKE_NONCOPYABLE(GetRegistrationForReadyCallback); | 125 WTF_MAKE_NONCOPYABLE(GetRegistrationForReadyCallback); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 ServiceWorkerContainer* ServiceWorkerContainer::Create( | 128 ServiceWorkerContainer* ServiceWorkerContainer::Create( |
| 129 ExecutionContext* execution_context, | 129 ExecutionContext* execution_context, |
| 130 NavigatorServiceWorker* navigator) { | 130 NavigatorServiceWorker* navigator) { |
| 131 return new ServiceWorkerContainer(execution_context, navigator); | 131 return new ServiceWorkerContainer(execution_context, navigator); |
| 132 } | 132 } |
| 133 | 133 |
| 134 ServiceWorkerContainer::~ServiceWorkerContainer() { | 134 ServiceWorkerContainer::~ServiceWorkerContainer() { |
| 135 ASSERT(!provider_); | 135 DCHECK(!provider_); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void ServiceWorkerContainer::ContextDestroyed(ExecutionContext*) { | 138 void ServiceWorkerContainer::ContextDestroyed(ExecutionContext*) { |
| 139 if (provider_) { | 139 if (provider_) { |
| 140 provider_->SetClient(0); | 140 provider_->SetClient(0); |
| 141 provider_ = nullptr; | 141 provider_ = nullptr; |
| 142 } | 142 } |
| 143 navigator_->ClearServiceWorker(); | 143 navigator_->ClearServiceWorker(); |
| 144 } | 144 } |
| 145 | 145 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 if (ServiceWorkerContainerClient* client = | 487 if (ServiceWorkerContainerClient* client = |
| 488 ServiceWorkerContainerClient::From(execution_context)) { | 488 ServiceWorkerContainerClient::From(execution_context)) { |
| 489 provider_ = client->Provider(); | 489 provider_ = client->Provider(); |
| 490 if (provider_) | 490 if (provider_) |
| 491 provider_->SetClient(this); | 491 provider_->SetClient(this); |
| 492 } | 492 } |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace blink | 495 } // namespace blink |
| OLD | NEW |