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

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

Issue 2527353002: Phase II Step 3: Reload LoFi/placeholder images via new ImageResource
Patch Set: tests 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/ImageResourceInfo.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceInfo.h b/third_party/WebKit/Source/core/fetch/ImageResourceInfo.h
index 7d5a656e7d3c76f23932dbab0c2f9b405c7683f8..90784423da36a507f319e902c0e6849afb500786 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResourceInfo.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResourceInfo.h
@@ -25,20 +25,22 @@ class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin {
public:
~ImageResourceInfo() {}
virtual const KURL& url() const = 0;
- virtual bool isSchedulingReload() const = 0;
virtual bool hasDevicePixelRatioHeaderValue() const = 0;
virtual float devicePixelRatioHeaderValue() const = 0;
virtual const ResourceResponse& response() const = 0;
virtual ResourceStatus getStatus() const = 0;
virtual bool isPlaceholder() const = 0;
virtual bool isCacheValidator() const = 0;
- virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0;
+ virtual bool shouldReloadBrokenPlaceholder() const = 0;
virtual bool isAccessAllowed(
SecurityOrigin*,
bool doesCurrentFrameHasSingleSecurityOrigin) const = 0;
virtual bool hasCacheControlNoStoreHeader() const = 0;
virtual const ResourceError& resourceError() const = 0;
+ // Only for tests.
+ virtual ImageResource* resourceForTest() const = 0;
+
DEFINE_INLINE_VIRTUAL_TRACE() {}
virtual void decodeError(bool allDataReceived) {}
@@ -49,6 +51,10 @@ class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin {
ResourceFetcher*,
const KURL&,
const AtomicString& initiatorName) {}
+ // Returns true if reloading is started.
+ virtual bool reloadIfLoFiOrPlaceholder(ResourceFetcher* fetcherForReload) {
+ return false;
+ }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698