OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2008, 2010 Apple Inc. All rights reserved. |
5 * Copyright (C) 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2011 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "core/dom/IncrementLoadEventDelayCount.h" | 30 #include "core/dom/IncrementLoadEventDelayCount.h" |
31 #include "core/html/HTMLElement.h" | 31 #include "core/html/HTMLElement.h" |
32 #include "core/html/LinkRelAttribute.h" | 32 #include "core/html/LinkRelAttribute.h" |
33 #include "core/html/LinkResource.h" | 33 #include "core/html/LinkResource.h" |
34 #include "core/html/LinkStyle.h" | 34 #include "core/html/LinkStyle.h" |
35 #include "core/html/RelList.h" | 35 #include "core/html/RelList.h" |
36 #include "core/loader/LinkLoader.h" | 36 #include "core/loader/LinkLoader.h" |
37 #include "core/loader/LinkLoaderClient.h" | 37 #include "core/loader/LinkLoaderClient.h" |
38 #include "platform/WebTaskRunner.h" | 38 #include "platform/WebTaskRunner.h" |
39 #include "platform/bindings/TraceWrapperMember.h" | 39 #include "platform/bindings/TraceWrapperMember.h" |
| 40 #include "public/platform/modules/serviceworker/WebServiceWorkerUpdateViaCache.h
" |
40 | 41 |
41 namespace blink { | 42 namespace blink { |
42 | 43 |
43 class KURL; | 44 class KURL; |
44 class LinkImport; | 45 class LinkImport; |
45 | 46 |
46 class CORE_EXPORT HTMLLinkElement final : public HTMLElement, | 47 class CORE_EXPORT HTMLLinkElement final : public HTMLElement, |
47 public LinkLoaderClient { | 48 public LinkLoaderClient { |
48 DEFINE_WRAPPERTYPEINFO(); | 49 DEFINE_WRAPPERTYPEINFO(); |
49 USING_GARBAGE_COLLECTED_MIXIN(HTMLLinkElement); | 50 USING_GARBAGE_COLLECTED_MIXIN(HTMLLinkElement); |
50 | 51 |
51 public: | 52 public: |
52 static HTMLLinkElement* Create(Document&, bool created_by_parser); | 53 static HTMLLinkElement* Create(Document&, bool created_by_parser); |
53 ~HTMLLinkElement() override; | 54 ~HTMLLinkElement() override; |
54 | 55 |
55 KURL Href() const; | 56 KURL Href() const; |
56 const AtomicString& Rel() const; | 57 const AtomicString& Rel() const; |
57 String Media() const { return media_; } | 58 String Media() const { return media_; } |
58 String TypeValue() const { return type_; } | 59 String TypeValue() const { return type_; } |
59 String AsValue() const { return as_; } | 60 String AsValue() const { return as_; } |
60 ReferrerPolicy GetReferrerPolicy() const { return referrer_policy_; } | 61 ReferrerPolicy GetReferrerPolicy() const { return referrer_policy_; } |
61 const LinkRelAttribute& RelAttribute() const { return rel_attribute_; } | 62 const LinkRelAttribute& RelAttribute() const { return rel_attribute_; } |
62 DOMTokenList& relList() const { | 63 DOMTokenList& relList() const { |
63 return static_cast<DOMTokenList&>(*rel_list_); | 64 return static_cast<DOMTokenList&>(*rel_list_); |
64 } | 65 } |
65 String Scope() const { return scope_; } | 66 String Scope() const { return scope_; } |
| 67 WebServiceWorkerUpdateViaCache UpdateViaCache() const { |
| 68 return update_via_cache_; |
| 69 } |
66 | 70 |
67 const AtomicString& GetType() const; | 71 const AtomicString& GetType() const; |
68 | 72 |
69 IconType GetIconType() const; | 73 IconType GetIconType() const; |
70 | 74 |
71 // the icon sizes as parsed from the HTML attribute | 75 // the icon sizes as parsed from the HTML attribute |
72 const Vector<IntSize>& IconSizes() const; | 76 const Vector<IntSize>& IconSizes() const; |
73 | 77 |
74 bool Async() const; | 78 bool Async() const; |
75 | 79 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 147 |
144 // From LinkLoaderClient | 148 // From LinkLoaderClient |
145 void LinkLoaded() override; | 149 void LinkLoaded() override; |
146 void LinkLoadingErrored() override; | 150 void LinkLoadingErrored() override; |
147 void DidStartLinkPrerender() override; | 151 void DidStartLinkPrerender() override; |
148 void DidStopLinkPrerender() override; | 152 void DidStopLinkPrerender() override; |
149 void DidSendLoadForLinkPrerender() override; | 153 void DidSendLoadForLinkPrerender() override; |
150 void DidSendDOMContentLoadedForLinkPrerender() override; | 154 void DidSendDOMContentLoadedForLinkPrerender() override; |
151 RefPtr<WebTaskRunner> GetLoadingTaskRunner() override; | 155 RefPtr<WebTaskRunner> GetLoadingTaskRunner() override; |
152 | 156 |
| 157 void ParseUpdateViaCacheAttribute(); |
| 158 |
153 Member<LinkResource> link_; | 159 Member<LinkResource> link_; |
154 Member<LinkLoader> link_loader_; | 160 Member<LinkLoader> link_loader_; |
155 | 161 |
156 String type_; | 162 String type_; |
157 String as_; | 163 String as_; |
158 String media_; | 164 String media_; |
159 ReferrerPolicy referrer_policy_; | 165 ReferrerPolicy referrer_policy_; |
160 Member<DOMTokenList> sizes_; | 166 Member<DOMTokenList> sizes_; |
161 Vector<IntSize> icon_sizes_; | 167 Vector<IntSize> icon_sizes_; |
162 TraceWrapperMember<RelList> rel_list_; | 168 TraceWrapperMember<RelList> rel_list_; |
163 LinkRelAttribute rel_attribute_; | 169 LinkRelAttribute rel_attribute_; |
164 String scope_; | 170 String scope_; |
| 171 WebServiceWorkerUpdateViaCache update_via_cache_; |
165 | 172 |
166 bool created_by_parser_; | 173 bool created_by_parser_; |
167 }; | 174 }; |
168 | 175 |
169 } // namespace blink | 176 } // namespace blink |
170 | 177 |
171 #endif // HTMLLinkElement_h | 178 #endif // HTMLLinkElement_h |
OLD | NEW |