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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ImageResourceInfo.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/resource/ImageResourceInfo.h
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceInfo.h b/third_party/WebKit/Source/core/loader/resource/ImageResourceInfo.h
index 70f787b7461e36655e94b026afe7edaf98463a34..2996e2b39d226aac70b19011dbae013d75e4cb0c 100644
--- a/third_party/WebKit/Source/core/loader/resource/ImageResourceInfo.h
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceInfo.h
@@ -28,14 +28,12 @@ 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;
enum DoesCurrentFrameHaveSingleSecurityOrigin {
HasMultipleSecurityOrigin,
HasSingleSecurityOrigin
@@ -50,6 +48,10 @@ class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin {
// (if any) DecodeError and finishes loading.
virtual void decodeError(bool allDataReceived) = 0;
+ // Returns true if reloading is started.
+ virtual bool reloadIfLoFiOrPlaceholderIfNeeded(
+ ResourceFetcher* fetcherForReload) = 0;
+
// TODO(hiroshige): Remove this once MemoryCache becomes further weaker.
virtual void setDecodedSize(size_t) = 0;
@@ -63,6 +65,9 @@ class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin {
const KURL&,
const AtomicString& initiatorName) = 0;
+ // Only for tests.
+ virtual const ImageResource* resourceForTest() const = 0;
+
DEFINE_INLINE_VIRTUAL_TRACE() {}
};

Powered by Google App Engine
This is Rietveld 408576698