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

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

Issue 1852663002: Oilpan: Remove WillBe types (part 9) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
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 32
33 namespace blink { 33 namespace blink {
34 34
35 class ImageResource; 35 class ImageResource;
36 class CSSImageSetValue; 36 class CSSImageSetValue;
37 37
38 // This class keeps one cached image and has access to a set of alternatives. 38 // This class keeps one cached image and has access to a set of alternatives.
39 39
40 class StyleFetchedImageSet final : public StyleImage, private ResourceClient { 40 class StyleFetchedImageSet final : public StyleImage, private ResourceClient {
41 USING_FAST_MALLOC_WILL_BE_REMOVED(StyleFetchedImageSet); 41 USING_PRE_FINALIZER(StyleFetchedImageSet, dispose);
42 WILL_BE_USING_PRE_FINALIZER(StyleFetchedImageSet, dispose);
43 public: 42 public:
44 static PassRefPtrWillBeRawPtr<StyleFetchedImageSet> create(ImageResource* im age, float imageScaleFactor, CSSImageSetValue* value, const KURL& url) 43 static RawPtr<StyleFetchedImageSet> create(ImageResource* image, float image ScaleFactor, CSSImageSetValue* value, const KURL& url)
45 { 44 {
46 return adoptRefWillBeNoop(new StyleFetchedImageSet(image, imageScaleFact or, value, url)); 45 return new StyleFetchedImageSet(image, imageScaleFactor, value, url);
47 } 46 }
48 ~StyleFetchedImageSet() override; 47 ~StyleFetchedImageSet() override;
49 48
50 PassRefPtrWillBeRawPtr<CSSValue> cssValue() const override; 49 RawPtr<CSSValue> cssValue() const override;
51 PassRefPtrWillBeRawPtr<CSSValue> computedCSSValue() const override; 50 RawPtr<CSSValue> computedCSSValue() const override;
52 51
53 // FIXME: This is used by StyleImage for equals comparison, but this impleme ntation 52 // FIXME: This is used by StyleImage for equals comparison, but this impleme ntation
54 // only looks at the image from the set that we have loaded. I'm not sure if that is 53 // only looks at the image from the set that we have loaded. I'm not sure if that is
55 // meaningful enough or not. 54 // meaningful enough or not.
56 WrappedImagePtr data() const override; 55 WrappedImagePtr data() const override;
57 56
58 #if !ENABLE(OILPAN) 57 #if !ENABLE(OILPAN)
59 void clearImageSetValue() { m_imageSetValue = nullptr; } 58 void clearImageSetValue() { m_imageSetValue = nullptr; }
60 #endif 59 #endif
61 60
(...skipping 12 matching lines...) Expand all
74 73
75 DECLARE_VIRTUAL_TRACE(); 74 DECLARE_VIRTUAL_TRACE();
76 75
77 private: 76 private:
78 StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValu e*, const KURL&); 77 StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValu e*, const KURL&);
79 78
80 void dispose(); 79 void dispose();
81 80
82 String debugName() const override { return "StyleFetchedImageSet"; } 81 String debugName() const override { return "StyleFetchedImageSet"; }
83 82
84 RefPtrWillBeMember<ImageResource> m_bestFitImage; 83 Member<ImageResource> m_bestFitImage;
85 float m_imageScaleFactor; 84 float m_imageScaleFactor;
86 85
87 RawPtrWillBeMember<CSSImageSetValue> m_imageSetValue; // Not retained; it ow ns us. 86 Member<CSSImageSetValue> m_imageSetValue; // Not retained; it owns us.
88 const KURL m_url; 87 const KURL m_url;
89 }; 88 };
90 89
91 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); 90 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet());
92 91
93 } // namespace blink 92 } // namespace blink
94 93
95 #endif // StyleFetchedImageSet_h 94 #endif // StyleFetchedImageSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698