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

Side by Side Diff: third_party/WebKit/Source/core/fetch/FetchRequest.h

Issue 1987413002: Add link preload as=document support Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: crash fix Created 4 years, 3 months 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
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void setResourceWidth(ResourceWidth); 78 void setResourceWidth(ResourceWidth);
79 79
80 ClientHintsPreferences& clientHintsPreferences() { return m_clientHintPrefer ences; } 80 ClientHintsPreferences& clientHintsPreferences() { return m_clientHintPrefer ences; }
81 81
82 bool forPreload() const { return m_forPreload; } 82 bool forPreload() const { return m_forPreload; }
83 void setForPreload(bool forPreload, double discoveryTime = 0); 83 void setForPreload(bool forPreload, double discoveryTime = 0);
84 84
85 double preloadDiscoveryTime() { return m_preloadDiscoveryTime; } 85 double preloadDiscoveryTime() { return m_preloadDiscoveryTime; }
86 86
87 bool isLinkPreload() { return m_linkPreload; } 87 bool isLinkPreload() { return m_linkPreload; }
88 void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; } 88 void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; m_r esourceRequest.setLinkPreload(isLinkPreload);}
89 89
90 void setContentSecurityCheck(ContentSecurityPolicyDisposition contentSecurit yPolicyOption) { m_options.contentSecurityPolicyOption = contentSecurityPolicyOp tion; } 90 void setContentSecurityCheck(ContentSecurityPolicyDisposition contentSecurit yPolicyOption) { m_options.contentSecurityPolicyOption = contentSecurityPolicyOp tion; }
91 void setCrossOriginAccessControl(SecurityOrigin*, CrossOriginAttributeValue) ; 91 void setCrossOriginAccessControl(SecurityOrigin*, CrossOriginAttributeValue) ;
92 OriginRestriction getOriginRestriction() const { return m_originRestriction; } 92 OriginRestriction getOriginRestriction() const { return m_originRestriction; }
93 void setOriginRestriction(OriginRestriction restriction) { m_originRestricti on = restriction; } 93 void setOriginRestriction(OriginRestriction restriction) { m_originRestricti on = restriction; }
94 const IntegrityMetadataSet integrityMetadata() const { return m_options.inte grityMetadata; } 94 const IntegrityMetadataSet integrityMetadata() const { return m_options.inte grityMetadata; }
95 void setIntegrityMetadata(const IntegrityMetadataSet& metadata) { m_options. integrityMetadata = metadata; } 95 void setIntegrityMetadata(const IntegrityMetadataSet& metadata) { m_options. integrityMetadata = metadata; }
96 96
97 String contentSecurityPolicyNonce() const { return m_options.contentSecurity PolicyNonce; } 97 String contentSecurityPolicyNonce() const { return m_options.contentSecurity PolicyNonce; }
98 void setContentSecurityPolicyNonce(const String& nonce) { m_options.contentS ecurityPolicyNonce = nonce; } 98 void setContentSecurityPolicyNonce(const String& nonce) { m_options.contentS ecurityPolicyNonce = nonce; }
99 99
100 void makeSynchronous(); 100 void makeSynchronous();
101 101
102 private: 102 private:
103 ResourceRequest m_resourceRequest; 103 ResourceRequest m_resourceRequest;
104 String m_charset; 104 String m_charset;
105 ResourceLoaderOptions m_options; 105 ResourceLoaderOptions m_options;
106 bool m_forPreload; 106 bool m_forPreload;
107 bool m_linkPreload; 107 bool m_linkPreload;
108 double m_preloadDiscoveryTime; 108 double m_preloadDiscoveryTime;
109 DeferOption m_defer; 109 DeferOption m_defer;
110 OriginRestriction m_originRestriction; 110 OriginRestriction m_originRestriction;
111 ResourceWidth m_resourceWidth; 111 ResourceWidth m_resourceWidth;
112 ClientHintsPreferences m_clientHintPreferences; 112 ClientHintsPreferences m_clientHintPreferences;
113 }; 113 };
114 114
115 } // namespace blink 115 } // namespace blink
116 116
117 #endif 117 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchContext.h ('k') | third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698