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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.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
Index: third_party/WebKit/Source/core/fetch/Resource.h
diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h
index 25e4147b2f6ac089314d1b5d89bcaa7df90f667b..da5a7760237a9984c7b9da2d43ee7352288b6ce5 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -50,6 +50,7 @@ namespace blink {
struct FetchInitiatorInfo;
class FetchRequest;
class ResourceClient;
+class ResourceFetcher;
class ResourceTimingInfo;
class ResourceLoader;
class SecurityOrigin;
@@ -100,6 +101,13 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
DontMarkAsReferenced,
};
+ // Used by reloadIfLoFiOrPlaceholderImage().
+ enum ReloadLoFiOrPlaceholderPolicy {
+ kReloadIfNeeded,
+ kReloadAlwaysWithExistingCachePolicy,
+ kReloadAlways,
+ };
+
virtual ~Resource();
DECLARE_VIRTUAL_TRACE();
@@ -332,6 +340,12 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
virtual void onMemoryDump(WebMemoryDumpLevelOfDetail,
WebProcessMemoryDump*) const;
+ // If this Resource is ImageResource and 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.
+ virtual void reloadIfLoFiOrPlaceholderImage(ResourceFetcher*,
+ ReloadLoFiOrPlaceholderPolicy) {}
+
static const char* resourceTypeToString(Type, const FetchInitiatorInfo&);
protected:
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698