Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: third_party/WebKit/Source/bindings/templates/partial_interface.h

Issue 2005433002: [Origin Trials] Install origin trial bindings on V8 context conditionally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-ef-install
Patch Set: Fix multiple definition of signature; addressing nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #ifndef {{v8_class_or_partial}}_h 2 #ifndef {{v8_class_or_partial}}_h
3 #define {{v8_class_or_partial}}_h 3 #define {{v8_class_or_partial}}_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 {% if attributes|origin_trial_enabled_attributes %}
11 class ScriptState;
12 {% endif %}
10 13
11 class {{v8_class_or_partial}} { 14 class {{v8_class_or_partial}} {
12 STATIC_ONLY({{v8_class_or_partial}}); 15 STATIC_ONLY({{v8_class_or_partial}});
13 public: 16 public:
14 static void initialize(); 17 static void initialize();
15 {% for method in methods if method.is_custom %} 18 {% for method in methods if method.is_custom %}
16 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::V alue>&); 19 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::V alue>&);
17 {% endfor %} 20 {% endfor %}
18 {% for attribute in attributes %} 21 {% for attribute in attributes %}
19 {% if attribute.has_custom_getter %}{# FIXME: and not attribute.implemented_ by #} 22 {% if attribute.has_custom_getter %}{# FIXME: and not attribute.implemented_ by #}
20 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallba ckInfo<v8::Value>&); 23 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallba ckInfo<v8::Value>&);
21 {% endif %} 24 {% endif %}
22 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_ by #} 25 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_ by #}
23 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::PropertyCallbackInfo<void>&); 26 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::PropertyCallbackInfo<void>&);
24 {% endif %} 27 {% endif %}
25 {% endfor %} 28 {% endfor %}
26 {# Custom internal fields #} 29 {# Custom internal fields #}
27 static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8: :FunctionTemplate>); 30 static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8: :FunctionTemplate>);
31 {% for group in attributes|origin_trial_enabled_attributes|groupby('origin_t rial_feature_name') %}{{newline}}
32 static void install{{group.grouper}}(ScriptState*, v8::Local<v8::Object> ins tance);
33 {% endfor %}
28 private: 34 private:
29 static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld& , v8::Local<v8::FunctionTemplate> interfaceTemplate); 35 static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld& , v8::Local<v8::FunctionTemplate> interfaceTemplate);
30 }; 36 };
31 } 37 }
32 #endif // {{v8_class_or_partial}}_h 38 #endif // {{v8_class_or_partial}}_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698