OLD | NEW |
1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
2 #ifndef {{v8_class}}_h | 2 #ifndef {{v8_class}}_h |
3 #define {{v8_class}}_h | 3 #define {{v8_class}}_h |
4 | 4 |
5 {% for filename in header_includes %} | 5 {% for filename in header_includes %} |
6 #include "{{filename}}" | 6 #include "{{filename}}" |
7 {% endfor %} | 7 {% endfor %} |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 {# persistentHandleIndex must be the last field, if it is present. | 144 {# persistentHandleIndex must be the last field, if it is present. |
145 Detailed explanation: https://codereview.chromium.org/139173012 | 145 Detailed explanation: https://codereview.chromium.org/139173012 |
146 FIXME: Remove this internal field, and share one field for either: | 146 FIXME: Remove this internal field, and share one field for either: |
147 * a persistent handle (if the object is in oilpan) or | 147 * a persistent handle (if the object is in oilpan) or |
148 * a C++ pointer to the DOM object (if the object is not in oilpan) #} | 148 * a C++ pointer to the DOM object (if the object is not in oilpan) #} |
149 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; | 149 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; |
150 {# End custom internal fields #} | 150 {# End custom internal fields #} |
151 static void installConditionallyEnabledProperties(v8::Local<v8::Object>, v8:
:Isolate*){% if has_conditional_attributes %}; | 151 static void installConditionallyEnabledProperties(v8::Local<v8::Object>, v8:
:Isolate*){% if has_conditional_attributes %}; |
152 {% else %} { } | 152 {% else %} { } |
153 {% endif %} | 153 {% endif %} |
154 static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const
DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function
> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate){% if unsco
peables or has_conditional_attributes_on_prototype or conditionally_enabled_meth
ods %}; | 154 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Con
text>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<
v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate
){% if unscopeables or has_conditional_attributes_on_prototype or conditionally_
enabled_methods %}; |
155 {% else %} { } | 155 {% else %} { } |
156 {% endif %} | 156 {% endif %} |
157 {% if has_partial_interface %} | 157 {% if has_partial_interface %} |
158 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepa
rePrototypeAndInterfaceObjectFunction); | 158 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepa
rePrototypeAndInterfaceObjectFunction); |
159 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMW
rapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 159 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMW
rapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
160 {% for method in methods if method.overloads and method.overloads.has_partia
l_overloads %} | 160 {% for method in methods if method.overloads and method.overloads.has_partia
l_overloads %} |
161 {{exported}}static void register{{method.name | blink_capitalize}}MethodForP
artialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); | 161 {{exported}}static void register{{method.name | blink_capitalize}}MethodForP
artialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
162 {% endfor %} | 162 {% endfor %} |
163 {% endif %} | 163 {% endif %} |
164 {% if has_partial_interface %} | 164 {% if has_partial_interface %} |
165 | 165 |
166 private: | 166 private: |
167 static InstallTemplateFunction install{{v8_class}}TemplateFunction; | 167 static InstallTemplateFunction install{{v8_class}}TemplateFunction; |
168 {% endif %} | 168 {% endif %} |
169 }; | 169 }; |
170 | 170 |
171 {% if has_event_constructor %} | 171 {% if has_event_constructor %} |
172 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&,
ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info); | 172 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&,
ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info); |
173 | 173 |
174 {% endif %} | 174 {% endif %} |
175 template <> | 175 template <> |
176 struct V8TypeOf<{{cpp_class}}> { | 176 struct V8TypeOf<{{cpp_class}}> { |
177 typedef {{v8_class}} Type; | 177 typedef {{v8_class}} Type; |
178 }; | 178 }; |
179 | 179 |
180 } // namespace blink | 180 } // namespace blink |
181 | 181 |
182 #endif // {{v8_class}}_h | 182 #endif // {{v8_class}}_h |
OLD | NEW |