OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 ContentSecurityPolicyDisposition contentSecurityPolicyOption; | 133 ContentSecurityPolicyDisposition contentSecurityPolicyOption; |
134 FetchInitiatorInfo initiatorInfo; | 134 FetchInitiatorInfo initiatorInfo; |
135 RequestInitiatorContext requestInitiatorContext; | 135 RequestInitiatorContext requestInitiatorContext; |
136 SynchronousPolicy synchronousPolicy; | 136 SynchronousPolicy synchronousPolicy; |
137 CORSEnabled corsEnabled; // If the resource is loaded out-of-origin, whether
or not to use CORS. | 137 CORSEnabled corsEnabled; // If the resource is loaded out-of-origin, whether
or not to use CORS. |
138 RefPtr<SecurityOrigin> securityOrigin; | 138 RefPtr<SecurityOrigin> securityOrigin; |
139 }; | 139 }; |
140 | 140 |
141 // Encode AtomicString (in FetchInitiatorInfo) as String to cross threads. | 141 // Encode AtomicString (in FetchInitiatorInfo) as String to cross threads. |
142 struct CrossThreadResourceLoaderOptionsData { | 142 struct CrossThreadResourceLoaderOptionsData { |
143 DISALLOW_ALLOCATION(); | 143 DISALLOW_NEW(); |
144 explicit CrossThreadResourceLoaderOptionsData(const ResourceLoaderOptions& o
ptions) | 144 explicit CrossThreadResourceLoaderOptionsData(const ResourceLoaderOptions& o
ptions) |
145 : dataBufferingPolicy(options.dataBufferingPolicy) | 145 : dataBufferingPolicy(options.dataBufferingPolicy) |
146 , allowCredentials(options.allowCredentials) | 146 , allowCredentials(options.allowCredentials) |
147 , credentialsRequested(options.credentialsRequested) | 147 , credentialsRequested(options.credentialsRequested) |
148 , contentSecurityPolicyOption(options.contentSecurityPolicyOption) | 148 , contentSecurityPolicyOption(options.contentSecurityPolicyOption) |
149 , initiatorInfo(options.initiatorInfo) | 149 , initiatorInfo(options.initiatorInfo) |
150 , requestInitiatorContext(options.requestInitiatorContext) | 150 , requestInitiatorContext(options.requestInitiatorContext) |
151 , synchronousPolicy(options.synchronousPolicy) | 151 , synchronousPolicy(options.synchronousPolicy) |
152 , corsEnabled(options.corsEnabled) | 152 , corsEnabled(options.corsEnabled) |
153 , securityOrigin(options.securityOrigin ? options.securityOrigin->isolat
edCopy() : nullptr) { } | 153 , securityOrigin(options.securityOrigin ? options.securityOrigin->isolat
edCopy() : nullptr) { } |
(...skipping 28 matching lines...) Expand all Loading... |
182 typedef CrossThreadResourceLoaderOptionsData Type; | 182 typedef CrossThreadResourceLoaderOptionsData Type; |
183 static Type copy(const ResourceLoaderOptions& options) | 183 static Type copy(const ResourceLoaderOptions& options) |
184 { | 184 { |
185 return CrossThreadResourceLoaderOptionsData(options); | 185 return CrossThreadResourceLoaderOptionsData(options); |
186 } | 186 } |
187 }; | 187 }; |
188 | 188 |
189 } // namespace blink | 189 } // namespace blink |
190 | 190 |
191 #endif // ResourceLoaderOptions_h | 191 #endif // ResourceLoaderOptions_h |
OLD | NEW |