OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PreloadRequest_h | 5 #ifndef PreloadRequest_h |
6 #define PreloadRequest_h | 6 #define PreloadRequest_h |
7 | 7 |
8 #include "core/fetch/ClientHintsPreferences.h" | 8 #include "core/fetch/ClientHintsPreferences.h" |
9 #include "core/fetch/FetchRequest.h" | 9 #include "core/fetch/FetchRequest.h" |
10 #include "core/fetch/Resource.h" | 10 #include "core/fetch/Resource.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 Resource::Type resourceType() const { return m_resourceType; } | 41 Resource::Type resourceType() const { return m_resourceType; } |
42 | 42 |
43 const String& resourceURL() const { return m_resourceURL; } | 43 const String& resourceURL() const { return m_resourceURL; } |
44 float resourceWidth() const { return m_resourceWidth.isSet ? m_resourceWidth
.width : 0; } | 44 float resourceWidth() const { return m_resourceWidth.isSet ? m_resourceWidth
.width : 0; } |
45 const KURL& baseURL() const { return m_baseURL; } | 45 const KURL& baseURL() const { return m_baseURL; } |
46 bool isPreconnect() const { return m_requestType == RequestTypePreconnect; } | 46 bool isPreconnect() const { return m_requestType == RequestTypePreconnect; } |
47 bool isCORS() const { return m_isCORSEnabled; } | 47 bool isCORS() const { return m_isCORSEnabled; } |
48 bool isAllowCredentials() const { return m_allowCredentials == AllowStoredCr
edentials; } | 48 bool isAllowCredentials() const { return m_allowCredentials == AllowStoredCr
edentials; } |
49 const ClientHintsPreferences& preferences() const { return m_clientHintsPref
erences; } | 49 const ClientHintsPreferences& preferences() const { return m_clientHintsPref
erences; } |
| 50 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } |
50 | 51 |
51 private: | 52 private: |
52 PreloadRequest(const String& initiatorName, | 53 PreloadRequest(const String& initiatorName, |
53 const TextPosition& initiatorPosition, | 54 const TextPosition& initiatorPosition, |
54 const String& resourceURL, | 55 const String& resourceURL, |
55 const KURL& baseURL, | 56 const KURL& baseURL, |
56 Resource::Type resourceType, | 57 Resource::Type resourceType, |
57 const FetchRequest::ResourceWidth& resourceWidth, | 58 const FetchRequest::ResourceWidth& resourceWidth, |
58 const ClientHintsPreferences& clientHintsPreferences, | 59 const ClientHintsPreferences& clientHintsPreferences, |
59 RequestType requestType, | 60 RequestType requestType, |
(...skipping 30 matching lines...) Expand all Loading... |
90 ClientHintsPreferences m_clientHintsPreferences; | 91 ClientHintsPreferences m_clientHintsPreferences; |
91 RequestType m_requestType; | 92 RequestType m_requestType; |
92 ReferrerPolicy m_referrerPolicy; | 93 ReferrerPolicy m_referrerPolicy; |
93 }; | 94 }; |
94 | 95 |
95 typedef Vector<OwnPtr<PreloadRequest>> PreloadRequestStream; | 96 typedef Vector<OwnPtr<PreloadRequest>> PreloadRequestStream; |
96 | 97 |
97 } | 98 } |
98 | 99 |
99 #endif | 100 #endif |
OLD | NEW |