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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.h

Issue 2510883003: Loading: remove dependencies from ResourceFetcher to ImageResource (Closed)
Patch Set: rebase ResourceFetcher.cpp 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ImageResource.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h
index 89643c20c0cc87117618f48ab64ec31072779415..29360cbc46fad5834d7fab9039a347494bdbdf13 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.h
@@ -69,17 +69,8 @@ class CORE_EXPORT ImageResource final
ImageResourceContent* getContent();
const ImageResourceContent* getContent() const;
- enum class ReloadCachePolicy {
- UseExistingPolicy = 0, // Don't modify the request's cache policy.
- BypassCache, // Modify the request so that the reload bypasses the cache.
- };
-
- // If this ImageResource has the Lo-Fi response headers or is a placeholder,
- // reload the full original image with the Lo-Fi state set to off and
- // optionally bypassing the cache.
- void reloadIfLoFiOrPlaceholder(
- ResourceFetcher*,
- ReloadCachePolicy = ReloadCachePolicy::BypassCache);
+ void reloadIfLoFiOrPlaceholderImage(ResourceFetcher*,
+ ReloadLoFiOrPlaceholderPolicy);
void didAddClient(ResourceClient*) override;
@@ -106,10 +97,6 @@ class CORE_EXPORT ImageResource final
// Used by tests.
bool isPlaceholder() const { return m_isPlaceholder; }
- bool shouldReloadBrokenPlaceholder() const {
- return m_isPlaceholder && willPaintBrokenImage();
- }
-
DECLARE_VIRTUAL_TRACE();
private:
@@ -144,6 +131,10 @@ class CORE_EXPORT ImageResource final
void flushImageIfNeeded(TimerBase*);
+ bool shouldReloadBrokenPlaceholder() const {
+ return m_isPlaceholder && willPaintBrokenImage();
+ }
+
bool willPaintBrokenImage() const;
Member<ImageResourceContent> m_content;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698