summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/core/fetch/ImageResource.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source/core/fetch/ImageResource.h')
-rw-r--r--third_party/WebKit/Source/core/fetch/ImageResource.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h
index 74849d1..4e79c38 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.h
@@ -38,7 +38,6 @@ namespace blink {
class FetchRequest;
class FloatSize;
class ImageResourceObserver;
-class Length;
class MemoryCache;
class ResourceClient;
class ResourceFetcher;
@@ -94,7 +93,7 @@ public:
void addObserver(ImageResourceObserver*);
void removeObserver(ImageResourceObserver*);
- bool hasClientsOrObservers() const override { return Resource::hasClientsOrObservers() || !m_observers.isEmpty(); }
+ bool hasClientsOrObservers() const override { return Resource::hasClientsOrObservers() || !m_observers.isEmpty() || !m_finishedObservers.isEmpty(); }
ResourcePriority priorityFromObservers() override;
@@ -158,7 +157,8 @@ private:
void updateImage(bool allDataReceived);
void clearImage();
// If not null, changeRect is the changed part of the image.
- void notifyObservers(const IntRect* changeRect = nullptr);
+ void notifyObservers(bool isNotifyingFinish, const IntRect* changeRect = nullptr);
+ void notifyObserver(ImageResourceObserver*, bool isNotifyingFinish, const IntRect* changeRect = nullptr);
float m_devicePixelRatioHeaderValue;
@@ -167,6 +167,7 @@ private:
MultipartParsingState m_multipartParsingState = MultipartParsingState::WaitingForFirstPart;
bool m_hasDevicePixelRatioHeaderValue;
HashCountedSet<ImageResourceObserver*> m_observers;
+ HashCountedSet<ImageResourceObserver*> m_finishedObservers;
};
DEFINE_RESOURCE_TYPE_CASTS(Image);