| 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 #ifndef {{v8_class_or_partial}}_h | 4 #ifndef {{v8_class_or_partial}}_h |
| 5 #define {{v8_class_or_partial}}_h | 5 #define {{v8_class_or_partial}}_h |
| 6 | 6 |
| 7 {% for filename in header_includes %} | 7 {% for filename in header_includes %} |
| 8 #include "{{filename}}" | 8 #include "{{filename}}" |
| 9 {% endfor %} | 9 {% endfor %} |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 |
| 12 {% if attributes|origin_trial_enabled_attributes %} | 13 {% if attributes|origin_trial_enabled_attributes %} |
| 13 class ScriptState; | 14 class ScriptState; |
| 14 {% endif %} | 15 {% endif %} |
| 15 | 16 |
| 16 class {{v8_class_or_partial}} { | 17 class {{v8_class_or_partial}} { |
| 17 STATIC_ONLY({{v8_class_or_partial}}); | 18 STATIC_ONLY({{v8_class_or_partial}}); |
| 18 public: | 19 public: |
| 19 static void initialize(); | 20 static void initialize(); |
| 20 {% for method in methods if method.is_custom %} | 21 {% for method in methods if method.is_custom %} |
| 21 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::V
alue>&); | 22 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::Val
ue>&); |
| 22 {% endfor %} | 23 {% endfor %} |
| 23 {% for attribute in attributes %} | 24 {% for attribute in attributes %} |
| 24 {% if attribute.has_custom_getter %}{# FIXME: and not attribute.implemented_
by #} | 25 {% if attribute.has_custom_getter %}{# FIXME: and not attribute.implemented_by
#} |
| 25 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallba
ckInfo<v8::Value>&); | 26 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallback
Info<v8::Value>&); |
| 26 {% endif %} | 27 {% endif %} |
| 27 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_
by #} | 28 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_by
#} |
| 28 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co
nst v8::PropertyCallbackInfo<void>&); | 29 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, cons
t v8::PropertyCallbackInfo<void>&); |
| 29 {% endif %} | 30 {% endif %} |
| 30 {% endfor %} | 31 {% endfor %} |
| 31 {% if unscopables or has_conditional_attributes_on_prototype or | 32 {% if unscopables or has_conditional_attributes_on_prototype or |
| 32 methods | conditionally_exposed(is_partial) %} | 33 methods | conditionally_exposed(is_partial) %} |
| 33 static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const
DOMWrapperWorld&, v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8:
:FunctionTemplate>); | 34 static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const D
OMWrapperWorld&, v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8::F
unctionTemplate>); |
| 34 {% endif %} | 35 {% endif %} |
| 35 {% for origin_trial_feature in origin_trial_features %}{{newline}} | 36 {% for origin_trial_feature in origin_trial_features %}{{newline}} |
| 36 static void install{{origin_trial_feature.name}}(ScriptState*, v8::Local<v8:
:Object> instance); | 37 static void install{{origin_trial_feature.name}}(ScriptState*, v8::Local<v8::O
bject> instance); |
| 37 static void install{{origin_trial_feature.name}}(v8::Isolate*, const DOMWrap
perWorld&, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::
Local<v8::Function> interface); | 38 static void install{{origin_trial_feature.name}}(v8::Isolate*, const DOMWrappe
rWorld&, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Lo
cal<v8::Function> interface); |
| 38 {% if not origin_trial_feature.needs_instance %} | 39 {% if not origin_trial_feature.needs_instance %} |
| 39 static void install{{origin_trial_feature.name}}(ScriptState*); | 40 static void install{{origin_trial_feature.name}}(ScriptState*); |
| 40 {% endif %} | 41 {% endif %} |
| 41 {% endfor %} | 42 {% endfor %} |
| 42 private: | 43 private: |
| 43 static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld&
, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 44 static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld&,
v8::Local<v8::FunctionTemplate> interfaceTemplate); |
| 44 }; | 45 }; |
| 45 } | 46 |
| 46 #endif // {{v8_class_or_partial}}_h | 47 } // namespace blink |
| 48 |
| 49 #endif // {{v8_class_or_partial}}_h |
| 47 | 50 |
| 48 {% endfilter %}{# format_blink_cpp_source_code #} | 51 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |