Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 10 matching lines...) Expand all Loading... | |
| 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CSSImageSetValue_h | 26 #ifndef CSSImageSetValue_h |
| 27 #define CSSImageSetValue_h | 27 #define CSSImageSetValue_h |
| 28 | 28 |
| 29 #include "core/css/CSSValueList.h" | 29 #include "core/css/CSSValueList.h" |
| 30 #include "platform/CrossOriginAttributeValue.h" | 30 #include "platform/CrossOriginAttributeValue.h" |
| 31 #include "platform/loader/fetch/FetchParameters.h" | |
| 31 #include "platform/weborigin/Referrer.h" | 32 #include "platform/weborigin/Referrer.h" |
| 32 #include "platform/wtf/Allocator.h" | 33 #include "platform/wtf/Allocator.h" |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 class Document; | 37 class Document; |
| 37 class StyleImage; | 38 class StyleImage; |
| 38 | 39 |
| 39 class CSSImageSetValue : public CSSValueList { | 40 class CSSImageSetValue : public CSSValueList { |
| 40 public: | 41 public: |
| 41 static CSSImageSetValue* Create() { return new CSSImageSetValue(); } | 42 static CSSImageSetValue* Create() { return new CSSImageSetValue(); } |
| 42 ~CSSImageSetValue(); | 43 ~CSSImageSetValue(); |
| 43 | 44 |
| 44 bool IsCachePending(float device_scale_factor) const; | 45 bool IsCachePending(float device_scale_factor) const; |
| 45 StyleImage* CachedImage(float device_scale_factor) const; | 46 StyleImage* CachedImage(float device_scale_factor) const; |
| 46 StyleImage* CacheImage( | 47 StyleImage* CacheImage( |
| 47 const Document&, | 48 const Document&, |
| 48 float device_scale_factor, | 49 float device_scale_factor, |
| 49 CrossOriginAttributeValue = kCrossOriginAttributeNotSet); | 50 CrossOriginAttributeValue = kCrossOriginAttributeNotSet, |
| 51 FetchParameters::PlaceholderImageRequestType = | |
| 52 FetchParameters::kDisallowPlaceholder); | |
|
kouhei (in TOK)
2017/04/28 03:50:50
Option 1. [Preferred] Can we make this non-optiona
Raj
2017/04/28 18:01:21
Made it non-optional.
| |
| 50 | 53 |
| 51 String CustomCSSText() const; | 54 String CustomCSSText() const; |
| 52 | 55 |
| 53 struct ImageWithScale { | 56 struct ImageWithScale { |
| 54 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 57 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 55 String image_url; | 58 String image_url; |
| 56 Referrer referrer; | 59 Referrer referrer; |
| 57 float scale_factor; | 60 float scale_factor; |
| 58 }; | 61 }; |
| 59 | 62 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 79 Member<StyleImage> cached_image_; | 82 Member<StyleImage> cached_image_; |
| 80 | 83 |
| 81 Vector<ImageWithScale> images_in_set_; | 84 Vector<ImageWithScale> images_in_set_; |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageSetValue, IsImageSetValue()); | 87 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageSetValue, IsImageSetValue()); |
| 85 | 88 |
| 86 } // namespace blink | 89 } // namespace blink |
| 87 | 90 |
| 88 #endif // CSSImageSetValue_h | 91 #endif // CSSImageSetValue_h |
| OLD | NEW |