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

Unified Diff: third_party/WebKit/Source/core/loader/ImageLoader.h

Issue 2864253003: Split ImageLoader::SetImage() and set flags consistently in tests (Closed)
Patch Set: Refine 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/core/loader/ImageLoader.h
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.h b/third_party/WebKit/Source/core/loader/ImageLoader.h
index f0cf0fee9eb961a68561109d97dd50b7032c40e5..60f92b952225a9c3046bd22e983ec44c7e3d5754 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.h
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.h
@@ -89,8 +89,13 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
ImageResource* ImageResourceForImageDocument() const {
return image_resource_for_image_document_;
}
+
// Cancels pending load events, and doesn't dispatch new ones.
- void SetImage(ImageResourceContent*);
+ // Note: ClearImage/SetImage.*() are not a simple setter.
+ // Check the implementation to see what they do.
+ // TODO(hiroshige): Cleanup these methods.
+ void ClearImage();
+ void SetImageForTest(ImageResourceContent*);
bool IsLoadingImageDocument() { return loading_image_document_; }
void SetLoadingImageDocument() { loading_image_document_ = true; }
@@ -133,7 +138,13 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
LayoutImageResource* GetLayoutImageResource();
void UpdateLayoutObject();
+ // Note: SetImage.*() are not a simple setter.
+ // Check the implementation to see what they do.
+ // TODO(hiroshige): Cleanup these methods.
+ void SetImageForImageDocument(ImageResource*);
void SetImageWithoutConsideringPendingLoadEvent(ImageResourceContent*);
+ void SetImageInternal(ImageResourceContent*);
+
void ClearFailedLoadURL();
void DispatchErrorEvent();
void CrossSiteOrCSPViolationOccurred(AtomicString);

Powered by Google App Engine
This is Rietveld 408576698