Index: Source/core/loader/ImageLoader.h |
diff --git a/Source/core/loader/ImageLoader.h b/Source/core/loader/ImageLoader.h |
index f06089e2e5ae62f7eea6a4e8c991302d79b64284..92f450981942022964f173f91a189da70e25b2d3 100644 |
--- a/Source/core/loader/ImageLoader.h |
+++ b/Source/core/loader/ImageLoader.h |
@@ -26,10 +26,19 @@ |
#include "core/loader/cache/CachedImage.h" |
#include "core/loader/cache/CachedImageClient.h" |
#include "core/loader/cache/CachedResourceHandle.h" |
+#include "wtf/HashSet.h" |
#include "wtf/text/AtomicString.h" |
namespace WebCore { |
+class ImageLoaderClient { |
+public: |
+ virtual void notifyImageSourceChanged() { } |
+ |
+protected: |
+ ImageLoaderClient() { } |
+}; |
+ |
class Element; |
class ImageLoader; |
class RenderImageResource; |
@@ -69,6 +78,9 @@ public: |
static void dispatchPendingLoadEvents(); |
static void dispatchPendingErrorEvents(); |
+ void addClient(ImageLoaderClient* client) { m_clients.add(client); } |
Stephen White
2013/07/25 18:01:07
I'm not sure if the ImageLoader is really the righ
|
+ void removeClient(ImageLoaderClient* client) { m_clients.remove(client); } |
+ |
protected: |
virtual void notifyFinished(CachedResource*); |
@@ -86,12 +98,14 @@ private: |
void updateRenderer(); |
void setImageWithoutConsideringPendingLoadEvent(CachedImage*); |
+ void sourceImageChanged(); |
void clearFailedLoadURL(); |
void timerFired(Timer<ImageLoader>*); |
Element* m_element; |
CachedResourceHandle<CachedImage> m_image; |
+ HashSet<ImageLoaderClient*> m_clients; |
Timer<ImageLoader> m_derefElementTimer; |
AtomicString m_failedLoadURL; |
bool m_hasPendingBeforeLoadEvent : 1; |