| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! | 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! |
| 6 | 6 |
| 7 #ifndef {{macro_guard}} | 7 #ifndef {{macro_guard}} |
| 8 #define {{macro_guard}} | 8 #define {{macro_guard}} |
| 9 | 9 |
| 10 {% for filename in header_includes %} | 10 {% for filename in header_includes %} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public: | 23 public: |
| 24 {{container.cpp_class}}(); | 24 {{container.cpp_class}}(); |
| 25 bool isNull() const { return m_type == SpecificTypeNone; } | 25 bool isNull() const { return m_type == SpecificTypeNone; } |
| 26 | 26 |
| 27 {% for member in container.members %} | 27 {% for member in container.members %} |
| 28 bool is{{member.type_name}}() const { return m_type == {{member.specific_typ
e_enum}}; } | 28 bool is{{member.type_name}}() const { return m_type == {{member.specific_typ
e_enum}}; } |
| 29 {{member.rvalue_cpp_type}} getAs{{member.type_name}}(); | 29 {{member.rvalue_cpp_type}} getAs{{member.type_name}}(); |
| 30 void set{{member.type_name}}({{member.rvalue_cpp_type}}); | 30 void set{{member.type_name}}({{member.rvalue_cpp_type}}); |
| 31 | 31 |
| 32 {% endfor %} | 32 {% endfor %} |
| 33 {% if container.needs_trace %} |
| 34 void trace(Visitor*); |
| 35 |
| 36 {% endif %} |
| 33 private: | 37 private: |
| 34 enum SpecificTypes { | 38 enum SpecificTypes { |
| 35 SpecificTypeNone, | 39 SpecificTypeNone, |
| 36 {% for member in container.members %} | 40 {% for member in container.members %} |
| 37 {{member.specific_type_enum}}, | 41 {{member.specific_type_enum}}, |
| 38 {% endfor %} | 42 {% endfor %} |
| 39 }; | 43 }; |
| 40 SpecificTypes m_type; | 44 SpecificTypes m_type; |
| 41 | 45 |
| 42 {% for member in container.members %} | 46 {% for member in container.members %} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 54 template <class CallbackInfo> | 58 template <class CallbackInfo> |
| 55 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{container.cpp_c
lass}}& impl) | 59 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{container.cpp_c
lass}}& impl) |
| 56 { | 60 { |
| 57 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 61 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 58 } | 62 } |
| 59 | 63 |
| 60 {% endfor %} | 64 {% endfor %} |
| 61 } // namespace blink | 65 } // namespace blink |
| 62 | 66 |
| 63 #endif // {{macro_guard}} | 67 #endif // {{macro_guard}} |
| OLD | NEW |