Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 {% include 'copyright_block.txt' %} | |
|
haraken
2016/07/30 15:35:02
You can add a test to bindings/tests/idls/.
| |
| 2 #ifndef {{class_name}}_h | |
| 3 #define {{class_name}}_h | |
| 4 | |
| 5 #include "config.h" | |
| 6 | |
| 7 {% for filename in header_includes %} | |
| 8 #include "{{filename}}" | |
| 9 {% endfor %} | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class {{class_name}} { | |
| 14 public: | |
| 15 explicit {{class_name}}({{interface_name}}* wrapped) | |
| 16 : m_wrapped(wrapped) | |
| 17 { | |
| 18 } | |
| 19 | |
| 20 // TODO(ojan): Handle void return types. | |
| 21 {% for attribute in attributes %} | |
| 22 {{attribute.idl_type}} {{attribute.name}}() | |
| 23 { | |
| 24 return {{attribute.idl_type}}(m_wrapped->{{attribute.name}}()); | |
| 25 } | |
| 26 {% endfor %} | |
| 27 | |
| 28 private: | |
| 29 {{interface_name}}* m_wrapped; | |
| 30 }; | |
| 31 | |
| 32 } // namespace blink | |
| 33 | |
| 34 #endif // {{class_name}}_h | |
| OLD | NEW |