Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.h

Issue 2424943002: Add ReferrerPolicy support to preload (Closed)
Patch Set: Test fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 public: 50 public:
51 static HTMLLinkElement* create(Document&, bool createdByParser); 51 static HTMLLinkElement* create(Document&, bool createdByParser);
52 ~HTMLLinkElement() override; 52 ~HTMLLinkElement() override;
53 53
54 KURL href() const; 54 KURL href() const;
55 const AtomicString& rel() const; 55 const AtomicString& rel() const;
56 String media() const { return m_media; } 56 String media() const { return m_media; }
57 String typeValue() const { return m_type; } 57 String typeValue() const { return m_type; }
58 String asValue() const { return m_as; } 58 String asValue() const { return m_as; }
59 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; }
59 const LinkRelAttribute& relAttribute() const { return m_relAttribute; } 60 const LinkRelAttribute& relAttribute() const { return m_relAttribute; }
60 DOMTokenList& relList() const { 61 DOMTokenList& relList() const {
61 return static_cast<DOMTokenList&>(*m_relList); 62 return static_cast<DOMTokenList&>(*m_relList);
62 } 63 }
63 String scope() const { return m_scope; } 64 String scope() const { return m_scope; }
64 65
65 const AtomicString& type() const; 66 const AtomicString& type() const;
66 67
67 IconType getIconType() const; 68 IconType getIconType() const;
68 69
(...skipping 20 matching lines...) Expand all
89 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>); 90 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
90 void scheduleEvent(); 91 void scheduleEvent();
91 92
92 // From LinkLoaderClient 93 // From LinkLoaderClient
93 bool shouldLoadLink() override; 94 bool shouldLoadLink() override;
94 95
95 // For LinkStyle 96 // For LinkStyle
96 bool loadLink(const String& type, 97 bool loadLink(const String& type,
97 const String& as, 98 const String& as,
98 const String& media, 99 const String& media,
100 ReferrerPolicy,
99 const KURL&); 101 const KURL&);
100 bool isAlternate() const { 102 bool isAlternate() const {
101 return linkStyle()->isUnset() && m_relAttribute.isAlternate(); 103 return linkStyle()->isUnset() && m_relAttribute.isAlternate();
102 } 104 }
103 bool shouldProcessStyle() { return linkResourceToProcess() && linkStyle(); } 105 bool shouldProcessStyle() { return linkResourceToProcess() && linkStyle(); }
104 bool isCreatedByParser() const { return m_createdByParser; } 106 bool isCreatedByParser() const { return m_createdByParser; }
105 107
106 DECLARE_VIRTUAL_TRACE(); 108 DECLARE_VIRTUAL_TRACE();
107 109
108 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 110 DECLARE_VIRTUAL_TRACE_WRAPPERS();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 144
143 // From DOMTokenListObserver 145 // From DOMTokenListObserver
144 void valueWasSet() final; 146 void valueWasSet() final;
145 147
146 Member<LinkResource> m_link; 148 Member<LinkResource> m_link;
147 Member<LinkLoader> m_linkLoader; 149 Member<LinkLoader> m_linkLoader;
148 150
149 String m_type; 151 String m_type;
150 String m_as; 152 String m_as;
151 String m_media; 153 String m_media;
154 ReferrerPolicy m_referrerPolicy;
152 Member<DOMTokenList> m_sizes; 155 Member<DOMTokenList> m_sizes;
153 Vector<IntSize> m_iconSizes; 156 Vector<IntSize> m_iconSizes;
154 Member<RelList> m_relList; 157 Member<RelList> m_relList;
155 LinkRelAttribute m_relAttribute; 158 LinkRelAttribute m_relAttribute;
156 String m_scope; 159 String m_scope;
157 160
158 bool m_createdByParser; 161 bool m_createdByParser;
159 }; 162 };
160 163
161 } // namespace blink 164 } // namespace blink
162 165
163 #endif // HTMLLinkElement_h 166 #endif // HTMLLinkElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698