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 e085120358f1d814ad63137b00984ff5f7035b2f..3ba4f1b8a8997145afeb92f8f3e317de1440f55e 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; |
@@ -102,7 +101,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; |
@@ -161,7 +160,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; |
@@ -169,6 +169,7 @@ private: |
RefPtr<blink::Image> m_image; |
bool m_hasDevicePixelRatioHeaderValue; |
HashCountedSet<ImageResourceObserver*> m_observers; |
+ HashCountedSet<ImageResourceObserver*> m_finishedObservers; |
}; |
DEFINE_RESOURCE_TYPE_CASTS(Image); |