| 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 #ifndef ServiceWorkerLinkResource_h | 5 #ifndef ServiceWorkerLinkResource_h |
| 6 #define ServiceWorkerLinkResource_h | 6 #define ServiceWorkerLinkResource_h |
| 7 | 7 |
| 8 #include "core/html/LinkResource.h" | 8 #include "core/html/LinkResource.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| 11 #include "wtf/PassOwnPtr.h" | 11 #include "wtf/PassOwnPtr.h" |
| 12 #include "wtf/RefPtr.h" | 12 #include "wtf/RefPtr.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class HTMLLinkElement; | 16 class HTMLLinkElement; |
| 17 | 17 |
| 18 class MODULES_EXPORT ServiceWorkerLinkResource final : public LinkResource { | 18 class MODULES_EXPORT ServiceWorkerLinkResource final : public LinkResource { |
| 19 public: | 19 public: |
| 20 | 20 |
| 21 static RawPtr<ServiceWorkerLinkResource> create(HTMLLinkElement* owner); | 21 static ServiceWorkerLinkResource* create(HTMLLinkElement* owner); |
| 22 | 22 |
| 23 ~ServiceWorkerLinkResource() override; | 23 ~ServiceWorkerLinkResource() override; |
| 24 | 24 |
| 25 // LinkResource implementation: | 25 // LinkResource implementation: |
| 26 void process() override; | 26 void process() override; |
| 27 LinkResourceType type() const override { return Other; } | 27 LinkResourceType type() const override { return Other; } |
| 28 bool hasLoaded() const override; | 28 bool hasLoaded() const override; |
| 29 void ownerRemoved() override; | 29 void ownerRemoved() override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 explicit ServiceWorkerLinkResource(HTMLLinkElement* owner); | 32 explicit ServiceWorkerLinkResource(HTMLLinkElement* owner); |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace blink | 35 } // namespace blink |
| 36 | 36 |
| 37 #endif // ServiceWorkerLinkResource_h | 37 #endif // ServiceWorkerLinkResource_h |
| OLD | NEW |