Index: third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h |
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h b/third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d6a223740dc6531bd082999d08b36015f22245cb |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CSSURLImageValue_h |
+#define CSSURLImageValue_h |
+ |
+#include "core/css/cssom/CSSStyleImageValue.h" |
+ |
+namespace blink { |
+ |
+class CORE_EXPORT CSSURLImageValue final : public CSSStyleImageValue { |
+ WTF_MAKE_NONCOPYABLE(CSSURLImageValue); |
+ DEFINE_WRAPPERTYPEINFO(); |
+public: |
+ static CSSURLImageValue* create(const AtomicString& url) |
+ { |
+ return new CSSURLImageValue(CSSImageValue::create(url)); |
+ } |
+ static CSSURLImageValue* create(const CSSImageValue* imageValue) |
+ { |
+ return new CSSURLImageValue(imageValue); |
+ } |
+ |
+ StyleValueType type() const override { return URLImageType; } |
+ |
+ const CSSValue* toCSSValue() const { return m_imageValue.get(); } |
+ |
+ const String& url() const { return m_imageValue->url(); } |
+ |
+private: |
+ explicit CSSURLImageValue(const CSSImageValue* imageValue) |
+ : CSSStyleImageValue(imageValue) |
+ { |
+ } |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // CSSResourceValue_h |