Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
| 4 | 4 |
| 5 // TODO(dglazkov): Use chromium-style path. | 5 #ifndef WEB_API_{{class_name.macro_case}}_H |
| 6 #ifndef {{class_name.macro_case}}_H | 6 #define WEB_API_{{class_name.macro_case}}_H |
| 7 #define {{class_name.macro_case}}_H | |
| 8 | 7 |
| 9 {% for include_file in header_includes %} | 8 {% for include_file in header_includes %} |
| 10 #include "{{include_file}}" | 9 #include "{{include_file}}" |
| 11 {% endfor %} | 10 {% endfor %} |
| 12 | 11 |
| 13 namespace blink { | 12 namespace blink { |
| 14 namespace api { | 13 class {{class_name.upper_camel_case}}; |
| 14 } | |
| 15 | 15 |
| 16 class {{class_name.upper_camel_case}}{{inherits_expression}} { | 16 namespace web { |
| 17 | 17 |
| 18 class {{class_name.upper_camel_case}} : public {% if not base_class -%} | |
| 19 blink::GarbageCollectedFinalized<{{class_name.upper_camel_case}}> | |
|
haraken
2017/02/11 09:56:46
I'm not sure if this needs to be 'Finalized'. If t
dglazkov
2017/02/11 21:56:20
Oh! Thanks for the tip. Changed.
| |
| 20 {%- else -%} | |
| 21 {{base_class}} | |
| 22 {%- endif %} { | |
| 23 public: | |
| 24 virtual ~{{class_name.upper_camel_case}}() = default; | |
| 25 | |
| 26 static {{class_name.upper_camel_case}}* Create(blink::{{class_name.upper_camel _case}}*); | |
| 27 | |
| 28 {% if not base_class %} | |
| 29 DECLARE_STATIC(); | |
|
haraken
2017/02/11 09:56:46
What is this for?
dglazkov
2017/02/11 21:56:21
That's... a booger :D
I meant to type DECLARE_TRA
| |
| 30 {% endif %} | |
| 31 | |
| 32 protected: | |
| 33 explicit {{class_name.upper_camel_case}}(blink::{{class_name.upper_camel_case} }* {{class_name.snake_case}}); | |
| 34 blink::{{class_name.upper_camel_case}}* {{class_name.snake_case}}() const; | |
| 35 | |
| 36 {% if not base_class %} | |
| 37 private: | |
| 38 blink::Member<blink::{{class_name.upper_camel_case}}> {{class_name.snake_case} }_; | |
| 39 {% endif %} | |
| 18 }; | 40 }; |
| 19 | 41 |
| 20 } // namespace api | 42 } // namespace web |
| 21 } // namespace blink | |
| 22 | 43 |
| 23 #endif // {{class_name.macro_case}}_H | 44 #endif // WEB_API_{{class_name.macro_case}}_H |
| 24 | 45 |
| 25 {% endfilter %} | 46 {% endfilter %} |
| OLD | NEW |