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

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

Issue 2864253003: Split ImageLoader::SetImage() and set flags consistently in tests (Closed)
Patch Set: Update comment 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..eb5c6562ae33f0336717bdd34d6f41f9030e8ccc 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 UpdateImageState(ImageResourceContent*);
+
void ClearFailedLoadURL();
void DispatchErrorEvent();
void CrossSiteOrCSPViolationOccurred(AtomicString);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLObjectElement.cpp ('k') | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698