OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CSSURLImageValue_h |
| 6 #define CSSURLImageValue_h |
| 7 |
| 8 #include "core/css/cssom/CSSStyleImageValue.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class CORE_EXPORT CSSURLImageValue : public CSSStyleImageValue { |
| 13 WTF_MAKE_NONCOPYABLE(CSSURLImageValue); |
| 14 DEFINE_WRAPPERTYPEINFO(); |
| 15 public: |
| 16 static CSSURLImageValue* create(const AtomicString& url) |
| 17 { |
| 18 return new CSSURLImageValue(CSSImageValue::create(url)); |
| 19 } |
| 20 static CSSURLImageValue* create(const CSSImageValue* imageValue) |
| 21 { |
| 22 return new CSSURLImageValue(imageValue); |
| 23 } |
| 24 |
| 25 StyleValueType type() const override { return URLImageType; } |
| 26 |
| 27 const CSSValue* toCSSValue() const { return m_imageValue.get(); } |
| 28 |
| 29 const String& url() const { return m_imageValue->url(); } |
| 30 |
| 31 private: |
| 32 CSSURLImageValue(const CSSImageValue* imageValue) |
| 33 : CSSStyleImageValue(imageValue) |
| 34 { |
| 35 } |
| 36 }; |
| 37 |
| 38 } // namespace blink |
| 39 |
| 40 #endif // CSSResourceValue_h |
OLD | NEW |