| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/serviceworkers/ServiceWorkerLinkResource.h" | 5 #include "modules/serviceworkers/ServiceWorkerLinkResource.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/V8BindingForCore.h" | 8 #include "bindings/core/v8/V8BindingForCore.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/frame/DOMWindow.h" | 10 #include "core/frame/DOMWindow.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 ->TimerTaskRunner() | 46 ->TimerTaskRunner() |
| 47 ->PostTask(BLINK_FROM_HERE, | 47 ->PostTask(BLINK_FROM_HERE, |
| 48 WTF::Bind(&LinkLoaderClient::LinkLoadingErrored, client_)); | 48 WTF::Bind(&LinkLoaderClient::LinkLoadingErrored, client_)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 WTF_MAKE_NONCOPYABLE(RegistrationCallback); | 52 WTF_MAKE_NONCOPYABLE(RegistrationCallback); |
| 53 | 53 |
| 54 Persistent<LinkLoaderClient> client_; | 54 Persistent<LinkLoaderClient> client_; |
| 55 }; | 55 }; |
| 56 } | 56 } // namespace |
| 57 | 57 |
| 58 ServiceWorkerLinkResource* ServiceWorkerLinkResource::Create( | 58 ServiceWorkerLinkResource* ServiceWorkerLinkResource::Create( |
| 59 HTMLLinkElement* owner) { | 59 HTMLLinkElement* owner) { |
| 60 return new ServiceWorkerLinkResource(owner); | 60 return new ServiceWorkerLinkResource(owner); |
| 61 } | 61 } |
| 62 | 62 |
| 63 ServiceWorkerLinkResource::~ServiceWorkerLinkResource() {} | 63 ServiceWorkerLinkResource::~ServiceWorkerLinkResource() {} |
| 64 | 64 |
| 65 void ServiceWorkerLinkResource::Process() { | 65 void ServiceWorkerLinkResource::Process() { |
| 66 if (!owner_ || !owner_->GetDocument().GetFrame()) | 66 if (!owner_ || !owner_->GetDocument().GetFrame()) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 | 108 |
| 109 void ServiceWorkerLinkResource::OwnerRemoved() { | 109 void ServiceWorkerLinkResource::OwnerRemoved() { |
| 110 Process(); | 110 Process(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ServiceWorkerLinkResource::ServiceWorkerLinkResource(HTMLLinkElement* owner) | 113 ServiceWorkerLinkResource::ServiceWorkerLinkResource(HTMLLinkElement* owner) |
| 114 : LinkResource(owner) {} | 114 : LinkResource(owner) {} |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| OLD | NEW |