Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.h |
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.h b/third_party/WebKit/Source/core/svg/graphics/SVGImage.h |
index 46a897a883a93a9a50b6ad0184e174685204dcfe..961f0ff53ab6e3da0f93ad98a809ddb50fe6d442 100644 |
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.h |
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.h |
@@ -33,6 +33,7 @@ |
#include "platform/heap/Handle.h" |
#include "platform/weborigin/KURL.h" |
#include "platform/wtf/Allocator.h" |
+#include "platform/wtf/WeakPtr.h" |
#include "third_party/skia/include/core/SkRefCnt.h" |
namespace blink { |
@@ -183,6 +184,14 @@ class CORE_EXPORT SVGImage final : public Image { |
void ScheduleTimelineRewind(); |
void FlushPendingTimelineRewind(); |
+ void LoadCompleted(); |
+ |
+ WTF::WeakPtr<SVGImage> AsWeakPtr() { |
+ return weak_ptr_factory_.CreateWeakPtr(); |
+ } |
+ |
+ class SVGImageLocalFrameClient; |
+ |
Persistent<SVGImageChromeClient> chrome_client_; |
Persistent<Page> page_; |
std::unique_ptr<PaintController> paint_controller_; |
@@ -194,6 +203,18 @@ class CORE_EXPORT SVGImage final : public Image { |
// the "concrete object size". For more, see: SVGImageForContainer.h |
IntSize intrinsic_size_; |
bool has_pending_timeline_rewind_; |
+ |
+ enum LoadState { |
+ kDataChangedNotStarted, |
+ kInDataChanged, |
+ kWaitingForAsyncLoadCompletion, |
+ kLoadCompletedSynchronously, |
fs
2017/05/05 10:52:42
We don't really need both kLoadCompletedSynchronou
hiroshige
2017/05/08 17:22:06
Mostly. The state assertion at the bottom of SVGIm
|
+ kLoadCompletedAsynchronously, |
+ }; |
+ |
+ LoadState load_state_ = kDataChangedNotStarted; |
+ |
+ WTF::WeakPtrFactory<SVGImage> weak_ptr_factory_; |
}; |
DEFINE_IMAGE_TYPE_CASTS(SVGImage); |