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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h

Issue 2869733004: Fix ImageResourceContent::Create()'s GetContentStatus() (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/core/loader/resource/ImageResourceContent.h
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h
index cd70475f0640b95062f29eb111a8a503f3f58f41..f105fb80c27e7c4ab631d2f9be4e3fa694a84313 100644
--- a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h
@@ -46,10 +46,15 @@ class CORE_EXPORT ImageResourceContent final
USING_GARBAGE_COLLECTED_MIXIN(ImageResourceContent);
public:
- static ImageResourceContent* Create(
- PassRefPtr<blink::Image> image = nullptr) {
- return new ImageResourceContent(std::move(image));
+ // Used for loading.
+ // Returned content will be associated immediately later with ImageResource.
+ static ImageResourceContent* CreateNotStarted() {
+ return new ImageResourceContent(nullptr);
}
+
+ // Creates ImageResourceContent from an already loaded image.
+ static ImageResourceContent* CreateLoaded(PassRefPtr<blink::Image>);
+
static ImageResourceContent* Fetch(FetchParameters&, ResourceFetcher*);
// Returns the nullImage() if the image is not available yet.

Powered by Google App Engine
This is Rietveld 408576698