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