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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImageSet.h

Issue 2486143002: Deprecated [ImageLoader 1c] Make StyleFetchedImageSet no longer ResourceClient (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 20 matching lines...) Expand all
31 #include "platform/geometry/LayoutSize.h" 31 #include "platform/geometry/LayoutSize.h"
32 #include "platform/weborigin/KURL.h" 32 #include "platform/weborigin/KURL.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class ImageResource; 36 class ImageResource;
37 class CSSImageSetValue; 37 class CSSImageSetValue;
38 38
39 // This class keeps one cached image and has access to a set of alternatives. 39 // This class keeps one cached image and has access to a set of alternatives.
40 40
41 class StyleFetchedImageSet final : public StyleImage, private ResourceClient { 41 class StyleFetchedImageSet final : public StyleImage {
42 USING_PRE_FINALIZER(StyleFetchedImageSet, dispose);
43 USING_GARBAGE_COLLECTED_MIXIN(StyleFetchedImageSet);
44
45 public: 42 public:
46 static StyleFetchedImageSet* create(ImageResource* image, 43 static StyleFetchedImageSet* create(ImageResource* image,
47 float imageScaleFactor, 44 float imageScaleFactor,
48 CSSImageSetValue* value, 45 CSSImageSetValue* value,
49 const KURL& url) { 46 const KURL& url) {
50 return new StyleFetchedImageSet(image, imageScaleFactor, value, url); 47 return new StyleFetchedImageSet(image, imageScaleFactor, value, url);
51 } 48 }
52 ~StyleFetchedImageSet() override; 49 ~StyleFetchedImageSet() override;
53 50
54 CSSValue* cssValue() const override; 51 CSSValue* cssValue() const override;
(...skipping 22 matching lines...) Expand all
77 ImageResource* cachedImage() const override; 74 ImageResource* cachedImage() const override;
78 75
79 DECLARE_VIRTUAL_TRACE(); 76 DECLARE_VIRTUAL_TRACE();
80 77
81 private: 78 private:
82 StyleFetchedImageSet(ImageResource*, 79 StyleFetchedImageSet(ImageResource*,
83 float imageScaleFactor, 80 float imageScaleFactor,
84 CSSImageSetValue*, 81 CSSImageSetValue*,
85 const KURL&); 82 const KURL&);
86 83
87 void dispose();
88
89 String debugName() const override { return "StyleFetchedImageSet"; }
90
91 Member<ImageResource> m_bestFitImage; 84 Member<ImageResource> m_bestFitImage;
92 float m_imageScaleFactor; 85 float m_imageScaleFactor;
93 86
94 Member<CSSImageSetValue> m_imageSetValue; // Not retained; it owns us. 87 Member<CSSImageSetValue> m_imageSetValue; // Not retained; it owns us.
95 const KURL m_url; 88 const KURL m_url;
96 }; 89 };
97 90
98 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); 91 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet());
99 92
100 } // namespace blink 93 } // namespace blink
101 94
102 #endif // StyleFetchedImageSet_h 95 #endif // StyleFetchedImageSet_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698