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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 2613853002: Phase III Step 2: Call imageNotifyFinished() and image load event after SVG loading completes (Closed)
Patch Set: Rebase Created 3 years, 7 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/platform/graphics/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index 64b4b264cf9408d6fbc76e609580660776513bcd..6f7ef4e545d894ca93049d769a77a482605c0ded 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -102,10 +102,22 @@ class PLATFORM_EXPORT Image : public ThreadSafeRefCounted<Image> {
int height() const { return Size().Height(); }
virtual bool GetHotSpot(IntPoint&) const { return false; }
- enum SizeAvailability { kSizeAvailable, kSizeUnavailable };
+ enum SizeAvailability {
+ kSizeUnavailable,
+ kSizeAvailableAndLoadingAsynchronously,
+ kSizeAvailable,
+ };
+
+ // If SetData() returns |kSizeAvailableAndLoadingAsynchronously|:
+ // Image loading is continuing asynchronously
+ // (only when |this| is SVGImage and |all_data_received| is true), and
+ // ImageResourceObserver::AsyncLoadCompleted() is called when finished.
+ // Otherwise:
+ // Image loading is completed synchronously.
+ // ImageResourceObserver::AsyncLoadCompleted() is not called.
virtual SizeAvailability SetData(PassRefPtr<SharedBuffer> data,
bool all_data_received);
- virtual SizeAvailability DataChanged(bool /*allDataReceived*/) {
+ virtual SizeAvailability DataChanged(bool /*all_data_received*/) {
return kSizeUnavailable;
}

Powered by Google App Engine
This is Rietveld 408576698