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

Side by Side Diff: mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl

Issue 1782543004: Reland: Mojo C++ bindings: replace '::' with '.' in the interface name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mojo-helpers.html Created 4 years, 9 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 {%- for method in interface.methods %} 1 {%- for method in interface.methods %}
2 var k{{interface.name}}_{{method.name}}_Name = {{method.ordinal}}; 2 var k{{interface.name}}_{{method.name}}_Name = {{method.ordinal}};
3 {%- endfor %} 3 {%- endfor %}
4 4
5 function {{interface.name}}Proxy(receiver) { 5 function {{interface.name}}Proxy(receiver) {
6 bindings.ProxyBase.call(this, receiver); 6 bindings.ProxyBase.call(this, receiver);
7 } 7 }
8 {{interface.name}}Proxy.prototype = Object.create(bindings.ProxyBase.prototype ); 8 {{interface.name}}Proxy.prototype = Object.create(bindings.ProxyBase.prototype );
9 9
10 {%- for method in interface.methods %} 10 {%- for method in interface.methods %}
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 {%- endif %} 154 {%- endif %}
155 {%- endfor %} 155 {%- endfor %}
156 } 156 }
157 if (paramsClass === null) 157 if (paramsClass === null)
158 return validator.validationError.NONE; 158 return validator.validationError.NONE;
159 return paramsClass.validate(messageValidator, messageValidator.message.getHe aderNumBytes()); 159 return paramsClass.validate(messageValidator, messageValidator.message.getHe aderNumBytes());
160 {%- endif %} 160 {%- endif %}
161 } 161 }
162 162
163 var {{interface.name}} = { 163 var {{interface.name}} = {
164 name: '{{namespace|replace(".","::")}}::{{interface.name}}', 164 name: '{{namespace}}.{{interface.name}}',
165 proxyClass: {{interface.name}}Proxy, 165 proxyClass: {{interface.name}}Proxy,
166 stubClass: {{interface.name}}Stub, 166 stubClass: {{interface.name}}Stub,
167 validateRequest: validate{{interface.name}}Request, 167 validateRequest: validate{{interface.name}}Request,
168 {%- if interface|has_callbacks %} 168 {%- if interface|has_callbacks %}
169 validateResponse: validate{{interface.name}}Response, 169 validateResponse: validate{{interface.name}}Response,
170 {%- else %} 170 {%- else %}
171 validateResponse: null, 171 validateResponse: null,
172 {%- endif %} 172 {%- endif %}
173 }; 173 };
174 {#--- Interface Constants #} 174 {#--- Interface Constants #}
175 {%- for constant in interface.constants %} 175 {%- for constant in interface.constants %}
176 {{interface.name}}.{{constant.name}} = {{constant.value|expression_to_text}}, 176 {{interface.name}}.{{constant.name}} = {{constant.value|expression_to_text}},
177 {%- endfor %} 177 {%- endfor %}
178 {#--- Interface Enums #} 178 {#--- Interface Enums #}
179 {%- from "enum_definition.tmpl" import enum_def -%} 179 {%- from "enum_definition.tmpl" import enum_def -%}
180 {%- for enum in interface.enums %} 180 {%- for enum in interface.enums %}
181 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }} 181 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }}
182 {%- endfor %} 182 {%- endfor %}
183 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request ; 183 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request ;
184 {%- if interface|has_callbacks %} 184 {%- if interface|has_callbacks %}
185 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon se; 185 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon se;
186 {%- else %} 186 {%- else %}
187 {{interface.name}}Proxy.prototype.validator = null; 187 {{interface.name}}Proxy.prototype.validator = null;
188 {%- endif %} 188 {%- endif %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698