OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google, Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 ClientHintsPreferences& clientHintsPreferences() { | 99 ClientHintsPreferences& clientHintsPreferences() { |
100 return m_clientHintPreferences; | 100 return m_clientHintPreferences; |
101 } | 101 } |
102 | 102 |
103 bool isSpeculativePreload() const { return m_speculativePreload; } | 103 bool isSpeculativePreload() const { return m_speculativePreload; } |
104 void setSpeculativePreload(bool speculativePreload, double discoveryTime = 0); | 104 void setSpeculativePreload(bool speculativePreload, double discoveryTime = 0); |
105 | 105 |
106 double preloadDiscoveryTime() { return m_preloadDiscoveryTime; } | 106 double preloadDiscoveryTime() { return m_preloadDiscoveryTime; } |
107 | 107 |
108 bool isLinkPreload() const { return m_linkPreload; } | 108 bool isLinkPreload() const { return m_options.initiatorInfo.isLinkPreload; } |
109 void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; } | 109 void setLinkPreload(bool isLinkPreload) { |
| 110 m_options.initiatorInfo.isLinkPreload = isLinkPreload; |
| 111 } |
110 | 112 |
111 void setContentSecurityCheck( | 113 void setContentSecurityCheck( |
112 ContentSecurityPolicyDisposition contentSecurityPolicyOption) { | 114 ContentSecurityPolicyDisposition contentSecurityPolicyOption) { |
113 m_options.contentSecurityPolicyOption = contentSecurityPolicyOption; | 115 m_options.contentSecurityPolicyOption = contentSecurityPolicyOption; |
114 } | 116 } |
115 void setCrossOriginAccessControl(SecurityOrigin*, CrossOriginAttributeValue); | 117 void setCrossOriginAccessControl(SecurityOrigin*, CrossOriginAttributeValue); |
116 OriginRestriction getOriginRestriction() const { return m_originRestriction; } | 118 OriginRestriction getOriginRestriction() const { return m_originRestriction; } |
117 void setOriginRestriction(OriginRestriction restriction) { | 119 void setOriginRestriction(OriginRestriction restriction) { |
118 m_originRestriction = restriction; | 120 m_originRestriction = restriction; |
119 } | 121 } |
(...skipping 30 matching lines...) Expand all Loading... |
150 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is | 152 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is |
151 // non-eligible, this method doesn't modify the ResourceRequest. Calling this | 153 // non-eligible, this method doesn't modify the ResourceRequest. Calling this |
152 // method sets m_placeholderImageRequestType to the appropriate value. | 154 // method sets m_placeholderImageRequestType to the appropriate value. |
153 void setAllowImagePlaceholder(); | 155 void setAllowImagePlaceholder(); |
154 | 156 |
155 private: | 157 private: |
156 ResourceRequest m_resourceRequest; | 158 ResourceRequest m_resourceRequest; |
157 String m_charset; | 159 String m_charset; |
158 ResourceLoaderOptions m_options; | 160 ResourceLoaderOptions m_options; |
159 bool m_speculativePreload; | 161 bool m_speculativePreload; |
160 bool m_linkPreload; | |
161 double m_preloadDiscoveryTime; | 162 double m_preloadDiscoveryTime; |
162 DeferOption m_defer; | 163 DeferOption m_defer; |
163 OriginRestriction m_originRestriction; | 164 OriginRestriction m_originRestriction; |
164 ResourceWidth m_resourceWidth; | 165 ResourceWidth m_resourceWidth; |
165 ClientHintsPreferences m_clientHintPreferences; | 166 ClientHintsPreferences m_clientHintPreferences; |
166 PlaceholderImageRequestType m_placeholderImageRequestType; | 167 PlaceholderImageRequestType m_placeholderImageRequestType; |
167 }; | 168 }; |
168 | 169 |
169 } // namespace blink | 170 } // namespace blink |
170 | 171 |
171 #endif | 172 #endif |
OLD | NEW |