Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #ifndef CSSStyleVariableReferenceValue_h | |
|
Timothy Loh
2016/07/07 05:40:26
There's a 3-line license header to add on new file
anthonyhkf
2016/07/08 00:17:17
Done.
| |
| 2 #define CSSStyleVariableReferenceValue_h | |
| 3 | |
| 4 #include "bindings/core/v8/ScriptWrappable.h" | |
| 5 #include "core/CSSPropertyNames.h" | |
| 6 #include "core/CoreExport.h" | |
| 7 #include "core/css/CSSValue.h" | |
| 8 | |
| 9 namespace blink { | |
| 10 | |
| 11 class CORE_EXPORT CSSStyleVariableReferenceValue final : public GarbageCollected Finalized<CSSStyleVariableReferenceValue>, public ScriptWrappable { | |
| 12 WTF_MAKE_NONCOPYABLE(CSSStyleVariableReferenceValue); | |
| 13 DEFINE_WRAPPERTYPEINFO(); | |
| 14 public: | |
| 15 virtual ~CSSStyleVariableReferenceValue() { } | |
| 16 | |
| 17 static CSSStyleVariableReferenceValue* create() | |
| 18 { | |
| 19 return new CSSStyleVariableReferenceValue(); | |
| 20 } | |
| 21 | |
| 22 // TODO(anthonyhkf): add fallback: create(variable, fallback) | |
| 23 static CSSStyleVariableReferenceValue* create(const String& variable) | |
| 24 { | |
| 25 return new CSSStyleVariableReferenceValue(variable); | |
| 26 } | |
| 27 | |
| 28 DEFINE_INLINE_TRACE() { } | |
| 29 | |
| 30 String variable() const { return m_variable; } | |
|
Timothy Loh
2016/07/07 05:40:26
const String& is probably more common (maybe avoid
anthonyhkf
2016/07/08 00:17:17
Done.
| |
| 31 | |
| 32 protected: | |
| 33 CSSStyleVariableReferenceValue() { } | |
|
meade_UTC10
2016/07/07 05:30:30
We shouldn't have this empty constructor - m_varia
anthonyhkf
2016/07/08 00:17:17
Done.
| |
| 34 | |
| 35 CSSStyleVariableReferenceValue(String variable) | |
| 36 { | |
|
Timothy Loh
2016/07/07 05:40:26
Use an initializer list here, e.g.
CSSStyl..(..)
anthonyhkf
2016/07/08 00:17:17
Done.
| |
| 37 m_variable = variable; | |
| 38 } | |
| 39 | |
| 40 String m_variable; | |
| 41 | |
| 42 }; | |
| 43 | |
| 44 } | |
|
Timothy Loh
2016/07/07 05:40:26
prevalent style is to write
} // namespace blink
anthonyhkf
2016/07/08 00:17:17
Done.
| |
| 45 | |
| 46 #endif | |
| OLD | NEW |