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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResourceObserver.h

Issue 1728313003: Split ImageResourceClient into ResourceClient and ImageResourceObserver [2/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and reflect comment Created 4 years, 9 months 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/fetch/ImageResourceObserver.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h b/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h
index 9a002c477c12100c035465e2c87e7df94b32d336..3b85a747c62e30f6a55e7dcb941d76c1f4fd787d 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h
@@ -39,7 +39,10 @@ public:
// Called whenever a frame of an image changes, either because we got more data from the network or
// because we are animating. If not null, the IntRect is the changed rect of the image.
- virtual void imageChanged(ImageResource*, const IntRect* = 0) { }
+ // imageChanged() is called with |isNotifyingFinish| = true exactly once
+ // around when ResourceClient::notifyFinished() would be called, and in
+ // the other cases |isNotifyingFinish| is false.
+ virtual void imageChanged(bool isNotifyingFinish, ImageResource*, const IntRect* = 0) { }
esprehn 2016/03/22 23:31:49 I think I'd rather two different callbacks for the
hiroshige 2016/03/24 17:26:44 Done. I added notifyFinished() here also, and reve
// Called to find out if this client wants to actually display the image. Used to tell when we
// can halt animation. Content nodes that hold image refs for example would not render the image,

Powered by Google App Engine
This is Rietveld 408576698