| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 ClientDidNotRequestCredentials | 90 ClientDidNotRequestCredentials |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 enum MixedContentBlockingTreatment { | 93 enum MixedContentBlockingTreatment { |
| 94 TreatAsDefaultForType, | 94 TreatAsDefaultForType, |
| 95 TreatAsPassiveContent, | 95 TreatAsPassiveContent, |
| 96 TreatAsActiveContent, | 96 TreatAsActiveContent, |
| 97 TreatAsAlwaysAllowedContent | 97 TreatAsAlwaysAllowedContent |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 enum SynchronousPolicy { |
| 101 RequestSynchronously, |
| 102 RequestAsynchronously |
| 103 }; |
| 104 |
| 100 struct ResourceLoaderOptions { | 105 struct ResourceLoaderOptions { |
| 101 ResourceLoaderOptions() | 106 ResourceLoaderOptions() |
| 102 : sendLoadCallbacks(DoNotSendCallbacks) | 107 : sendLoadCallbacks(DoNotSendCallbacks) |
| 103 , sniffContent(DoNotSniffContent) | 108 , sniffContent(DoNotSniffContent) |
| 104 , dataBufferingPolicy(BufferData) | 109 , dataBufferingPolicy(BufferData) |
| 105 , allowCredentials(DoNotAllowStoredCredentials) | 110 , allowCredentials(DoNotAllowStoredCredentials) |
| 106 , credentialsRequested(ClientDidNotRequestCredentials) | 111 , credentialsRequested(ClientDidNotRequestCredentials) |
| 107 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) | 112 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) |
| 108 , securityCheck(DoSecurityCheck) | 113 , securityCheck(DoSecurityCheck) |
| 109 , contentSecurityPolicyOption(CheckContentSecurityPolicy) | 114 , contentSecurityPolicyOption(CheckContentSecurityPolicy) |
| 110 , requestOriginPolicy(UseDefaultOriginRestrictionsForType) | 115 , requestOriginPolicy(UseDefaultOriginRestrictionsForType) |
| 111 , requestInitiatorContext(DocumentContext) | 116 , requestInitiatorContext(DocumentContext) |
| 112 , mixedContentBlockingTreatment(TreatAsDefaultForType) | 117 , mixedContentBlockingTreatment(TreatAsDefaultForType) |
| 118 , synchronousPolicy(RequestAsynchronously) |
| 113 { | 119 { |
| 114 } | 120 } |
| 115 | 121 |
| 116 ResourceLoaderOptions( | 122 ResourceLoaderOptions( |
| 117 SendCallbackPolicy sendLoadCallbacks, | 123 SendCallbackPolicy sendLoadCallbacks, |
| 118 ContentSniffingPolicy sniffContent, | 124 ContentSniffingPolicy sniffContent, |
| 119 DataBufferingPolicy dataBufferingPolicy, | 125 DataBufferingPolicy dataBufferingPolicy, |
| 120 StoredCredentials allowCredentials, | 126 StoredCredentials allowCredentials, |
| 121 CredentialRequest credentialsRequested, | 127 CredentialRequest credentialsRequested, |
| 122 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, | 128 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, |
| 123 SecurityCheckPolicy securityCheck, | 129 SecurityCheckPolicy securityCheck, |
| 124 ContentSecurityPolicyCheck contentSecurityPolicyOption, | 130 ContentSecurityPolicyCheck contentSecurityPolicyOption, |
| 125 RequestOriginPolicy requestOriginPolicy, | 131 RequestOriginPolicy requestOriginPolicy, |
| 126 RequestInitiatorContext requestInitiatorContext) | 132 RequestInitiatorContext requestInitiatorContext) |
| 127 : sendLoadCallbacks(sendLoadCallbacks) | 133 : sendLoadCallbacks(sendLoadCallbacks) |
| 128 , sniffContent(sniffContent) | 134 , sniffContent(sniffContent) |
| 129 , dataBufferingPolicy(dataBufferingPolicy) | 135 , dataBufferingPolicy(dataBufferingPolicy) |
| 130 , allowCredentials(allowCredentials) | 136 , allowCredentials(allowCredentials) |
| 131 , credentialsRequested(credentialsRequested) | 137 , credentialsRequested(credentialsRequested) |
| 132 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) | 138 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) |
| 133 , securityCheck(securityCheck) | 139 , securityCheck(securityCheck) |
| 134 , contentSecurityPolicyOption(contentSecurityPolicyOption) | 140 , contentSecurityPolicyOption(contentSecurityPolicyOption) |
| 135 , requestOriginPolicy(requestOriginPolicy) | 141 , requestOriginPolicy(requestOriginPolicy) |
| 136 , requestInitiatorContext(requestInitiatorContext) | 142 , requestInitiatorContext(requestInitiatorContext) |
| 137 , mixedContentBlockingTreatment(TreatAsDefaultForType) | 143 , mixedContentBlockingTreatment(TreatAsDefaultForType) |
| 144 , synchronousPolicy(RequestAsynchronously) |
| 138 { | 145 { |
| 139 } | 146 } |
| 140 | 147 |
| 141 SendCallbackPolicy sendLoadCallbacks; | 148 SendCallbackPolicy sendLoadCallbacks; |
| 142 ContentSniffingPolicy sniffContent; | 149 ContentSniffingPolicy sniffContent; |
| 143 DataBufferingPolicy dataBufferingPolicy; | 150 DataBufferingPolicy dataBufferingPolicy; |
| 144 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. | 151 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. |
| 145 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. | 152 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. |
| 146 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). | 153 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). |
| 147 SecurityCheckPolicy securityCheck; | 154 SecurityCheckPolicy securityCheck; |
| 148 ContentSecurityPolicyCheck contentSecurityPolicyOption; | 155 ContentSecurityPolicyCheck contentSecurityPolicyOption; |
| 149 FetchInitiatorInfo initiatorInfo; | 156 FetchInitiatorInfo initiatorInfo; |
| 150 RequestOriginPolicy requestOriginPolicy; | 157 RequestOriginPolicy requestOriginPolicy; |
| 151 RequestInitiatorContext requestInitiatorContext; | 158 RequestInitiatorContext requestInitiatorContext; |
| 152 MixedContentBlockingTreatment mixedContentBlockingTreatment; | 159 MixedContentBlockingTreatment mixedContentBlockingTreatment; |
| 160 SynchronousPolicy synchronousPolicy; |
| 153 }; | 161 }; |
| 154 | 162 |
| 155 } // namespace WebCore | 163 } // namespace WebCore |
| 156 | 164 |
| 157 #endif // ResourceLoaderOptions_h | 165 #endif // ResourceLoaderOptions_h |
| OLD | NEW |