| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class CORE_EXPORT FetchRequest { | 42 class CORE_EXPORT FetchRequest { |
| 43 STACK_ALLOCATED(); | 43 STACK_ALLOCATED(); |
| 44 | 44 |
| 45 public: | 45 public: |
| 46 enum DeferOption { NoDefer, LazyLoad, IdleLoad }; | 46 enum DeferOption { NoDefer, LazyLoad, IdleLoad }; |
| 47 enum OriginRestriction { | 47 enum OriginRestriction { |
| 48 UseDefaultOriginRestrictionForType, | 48 UseDefaultOriginRestrictionForType, |
| 49 RestrictToSameOrigin, | 49 RestrictToSameOrigin, |
| 50 NoOriginRestriction | 50 NoOriginRestriction |
| 51 }; | 51 }; |
| 52 enum PlaceholderImageRequestType { |
| 53 DisallowPlaceholder = 0, // The requested image must not be a placeholder. |
| 54 AllowPlaceholder, // The image is allowed to be a placeholder. |
| 55 }; |
| 52 | 56 |
| 53 struct ResourceWidth { | 57 struct ResourceWidth { |
| 54 DISALLOW_NEW(); | 58 DISALLOW_NEW(); |
| 55 float width; | 59 float width; |
| 56 bool isSet; | 60 bool isSet; |
| 57 | 61 |
| 58 ResourceWidth() : width(0), isSet(false) {} | 62 ResourceWidth() : width(0), isSet(false) {} |
| 59 }; | 63 }; |
| 60 | 64 |
| 61 FetchRequest(const ResourceRequest&, | 65 FetchRequest(const ResourceRequest&, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 return m_options.contentSecurityPolicyNonce; | 118 return m_options.contentSecurityPolicyNonce; |
| 115 } | 119 } |
| 116 void setContentSecurityPolicyNonce(const String& nonce) { | 120 void setContentSecurityPolicyNonce(const String& nonce) { |
| 117 m_options.contentSecurityPolicyNonce = nonce; | 121 m_options.contentSecurityPolicyNonce = nonce; |
| 118 } | 122 } |
| 119 | 123 |
| 120 void setParserDisposition(ParserDisposition parserDisposition) { | 124 void setParserDisposition(ParserDisposition parserDisposition) { |
| 121 m_options.parserDisposition = parserDisposition; | 125 m_options.parserDisposition = parserDisposition; |
| 122 } | 126 } |
| 123 | 127 |
| 128 PlaceholderImageRequestType placeholderImageRequestType() const { |
| 129 return m_placeholderImageRequestType; |
| 130 } |
| 131 void setPlaceholderImageRequestType( |
| 132 PlaceholderImageRequestType placeholderImageRequestType) { |
| 133 m_placeholderImageRequestType = placeholderImageRequestType; |
| 134 } |
| 135 |
| 124 void makeSynchronous(); | 136 void makeSynchronous(); |
| 125 | 137 |
| 126 private: | 138 private: |
| 127 ResourceRequest m_resourceRequest; | 139 ResourceRequest m_resourceRequest; |
| 128 String m_charset; | 140 String m_charset; |
| 129 ResourceLoaderOptions m_options; | 141 ResourceLoaderOptions m_options; |
| 130 bool m_forPreload; | 142 bool m_forPreload; |
| 131 bool m_linkPreload; | 143 bool m_linkPreload; |
| 132 double m_preloadDiscoveryTime; | 144 double m_preloadDiscoveryTime; |
| 133 DeferOption m_defer; | 145 DeferOption m_defer; |
| 134 OriginRestriction m_originRestriction; | 146 OriginRestriction m_originRestriction; |
| 135 ResourceWidth m_resourceWidth; | 147 ResourceWidth m_resourceWidth; |
| 136 ClientHintsPreferences m_clientHintPreferences; | 148 ClientHintsPreferences m_clientHintPreferences; |
| 149 PlaceholderImageRequestType m_placeholderImageRequestType; |
| 137 }; | 150 }; |
| 138 | 151 |
| 139 } // namespace blink | 152 } // namespace blink |
| 140 | 153 |
| 141 #endif | 154 #endif |
| OLD | NEW |