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

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

Issue 2527353002: Phase II Step 3: Reload LoFi/placeholder images via new ImageResource
Patch Set: reloadLoFiImages test Created 4 years 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 PlaceholderImageRequestType placeholderImageRequestType() const { 137 PlaceholderImageRequestType placeholderImageRequestType() const {
138 return m_placeholderImageRequestType; 138 return m_placeholderImageRequestType;
139 } 139 }
140 140
141 // Configures the request to load an image placeholder if the request is 141 // Configures the request to load an image placeholder if the request is
142 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is 142 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is
143 // non-eligible, this method doesn't modify the ResourceRequest. Calling this 143 // non-eligible, this method doesn't modify the ResourceRequest. Calling this
144 // method sets m_placeholderImageRequestType to the appropriate value. 144 // method sets m_placeholderImageRequestType to the appropriate value.
145 void setAllowImagePlaceholder(); 145 void setAllowImagePlaceholder();
146 146
147 // Enforce creation of new Resource object.
148 // Currently this is only for LoFi/Placeholder image reloading.
149 bool enforceNewResource() const { return m_enforceNewResource; }
150 void setEnforceNewResource() { m_enforceNewResource = true; }
151
147 private: 152 private:
148 ResourceRequest m_resourceRequest; 153 ResourceRequest m_resourceRequest;
149 String m_charset; 154 String m_charset;
150 ResourceLoaderOptions m_options; 155 ResourceLoaderOptions m_options;
151 bool m_forPreload; 156 bool m_forPreload;
152 bool m_linkPreload; 157 bool m_linkPreload;
153 double m_preloadDiscoveryTime; 158 double m_preloadDiscoveryTime;
154 DeferOption m_defer; 159 DeferOption m_defer;
155 OriginRestriction m_originRestriction; 160 OriginRestriction m_originRestriction;
156 ResourceWidth m_resourceWidth; 161 ResourceWidth m_resourceWidth;
157 ClientHintsPreferences m_clientHintPreferences; 162 ClientHintsPreferences m_clientHintPreferences;
158 PlaceholderImageRequestType m_placeholderImageRequestType; 163 PlaceholderImageRequestType m_placeholderImageRequestType;
164 bool m_enforceNewResource = false;
159 }; 165 };
160 166
161 } // namespace blink 167 } // namespace blink
162 168
163 #endif 169 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698