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

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

Issue 2877583002: Refactor ImageLoader::UpdateFromElement(kUpdateForcedReload) (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eb5c6562ae33f0336717bdd34d6f41f9030e8ccc..8e4f753d5988c2c9db12c85d88498634512e3572 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.h
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.h
@@ -86,9 +86,6 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
bool ImageComplete() const { return image_complete_ && !pending_task_; }
ImageResourceContent* GetImage() const { return image_.Get(); }
- ImageResource* ImageResourceForImageDocument() const {
- return image_resource_for_image_document_;
- }
// Cancels pending load events, and doesn't dispatch new ones.
// Note: ClearImage/SetImage.*() are not a simple setter.
@@ -97,8 +94,21 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
void ClearImage();
void SetImageForTest(ImageResourceContent*);
+ // Image document loading:
+ // When |loading_image_document_| is true:
+ // Loading via ImageDocument.
+ // |image_resource_for_image_document_| points to a ImageResource that is
+ // not associated with a ResourceLoader.
+ // The corresponding ImageDocument is responsible for supplying the response
+ // and data to |image_resource_for_image_document_| and thus |image_|.
+ // Otherwise:
+ // Normal loading via ResourceFetcher/ResourceLoader.
+ // |image_resource_for_image_document_| is null.
bool IsLoadingImageDocument() { return loading_image_document_; }
void SetLoadingImageDocument() { loading_image_document_ = true; }
+ ImageResource* ImageResourceForImageDocument() const {
+ return image_resource_for_image_document_;
+ }
bool HasPendingActivity() const {
return has_pending_load_event_ || has_pending_error_event_ || pending_task_;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698