Chromium Code Reviews| Index: Source/bindings/templates/web_modules_interface.h |
| diff --git a/Source/bindings/templates/web_modules_interface.h b/Source/bindings/templates/web_modules_interface.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..085c1eb66b8df5a7bda2f0a643fa11019a4bf129 |
| --- /dev/null |
| +++ b/Source/bindings/templates/web_modules_interface.h |
| @@ -0,0 +1,34 @@ |
| +{% include 'copyright_block.txt' %} |
|
haraken
2016/07/30 15:35:02
You can add a test to bindings/tests/idls/.
|
| +#ifndef {{class_name}}_h |
| +#define {{class_name}}_h |
| + |
| +#include "config.h" |
| + |
| +{% for filename in header_includes %} |
| +#include "{{filename}}" |
| +{% endfor %} |
| + |
| +namespace blink { |
| + |
| +class {{class_name}} { |
| +public: |
| + explicit {{class_name}}({{interface_name}}* wrapped) |
| + : m_wrapped(wrapped) |
| + { |
| + } |
| + |
| + // TODO(ojan): Handle void return types. |
| + {% for attribute in attributes %} |
| + {{attribute.idl_type}} {{attribute.name}}() |
| + { |
| + return {{attribute.idl_type}}(m_wrapped->{{attribute.name}}()); |
| + } |
| + {% endfor %} |
| + |
| +private: |
| + {{interface_name}}* m_wrapped; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // {{class_name}}_h |