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 0bd9f9b0a96f461828c07e694071a1ea7347f988..24bca83b3271905f92c52e16fcfe16c7ee4a9a67 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; |
@@ -96,7 +95,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; |
@@ -155,7 +154,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; |
@@ -163,6 +163,7 @@ private: |
RefPtr<blink::Image> m_image; |
bool m_hasDevicePixelRatioHeaderValue; |
HashCountedSet<ImageResourceObserver*> m_observers; |
+ HashCountedSet<ImageResourceObserver*> m_finishedObservers; |
}; |
DEFINE_RESOURCE_TYPE_CASTS(Image); |