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

Side by Side Diff: templates/TypeBuilder_h.template

Issue 2509573006: [inspector_protocol] Support features for content/ generator. (Closed)
Patch Set: DCHECK Created 4 years, 1 month 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
« no previous file with comments | « templates/TypeBuilder_cpp.template ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This file is generated 1 // This file is generated
2 2
3 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 3 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be 4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file. 5 // found in the LICENSE file.
6 6
7 #ifndef {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h 7 #ifndef {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h
8 #define {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h 8 #define {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h
9 9
10 {% if config.protocol.export_header %} 10 {% if config.protocol.export_header %}
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 {%- for parameter in command.returns -%} 197 {%- for parameter in command.returns -%}
198 {%- if "optional" in parameter -%} 198 {%- if "optional" in parameter -%}
199 Maybe<{{resolve_type(parameter).raw_type}}> {{parameter.name}} 199 Maybe<{{resolve_type(parameter).raw_type}}> {{parameter.name}}
200 {%- else -%} 200 {%- else -%}
201 {{resolve_type(parameter).pass_type}} {{parameter.name}} 201 {{resolve_type(parameter).pass_type}} {{parameter.name}}
202 {%- endif -%} 202 {%- endif -%}
203 {%- if not loop.last -%}, {% endif -%} 203 {%- if not loop.last -%}, {% endif -%}
204 {%- endfor -%} 204 {%- endfor -%}
205 ) = 0; 205 ) = 0;
206 virtual void sendFailure(const DispatchResponse&) = 0; 206 virtual void sendFailure(const DispatchResponse&) = 0;
207 virtual void fallThrough() = 0;
207 virtual ~{{command.name | to_title_case}}Callback() { } 208 virtual ~{{command.name | to_title_case}}Callback() { }
208 }; 209 };
209 {% endif %} 210 {% endif %}
210 {%- if not is_async_command(domain.domain, command.name) %} 211 {%- if not is_async_command(domain.domain, command.name) %}
211 virtual DispatchResponse {{command.name | to_method_case}}( 212 virtual DispatchResponse {{command.name | to_method_case}}(
212 {%- else %} 213 {%- else %}
213 virtual void {{command.name | to_method_case}}( 214 virtual void {{command.name | to_method_case}}(
214 {%- endif %} 215 {%- endif %}
215 {%- for parameter in command.parameters -%} 216 {%- for parameter in command.parameters -%}
216 {%- if not loop.first -%}, {% endif -%} 217 {%- if not loop.first -%}, {% endif -%}
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 {%- if "optional" in parameter -%} 257 {%- if "optional" in parameter -%}
257 Maybe<{{resolve_type(parameter).raw_type}}> {{parameter.name}} = Maybe<{ {resolve_type(parameter).raw_type}}>() 258 Maybe<{{resolve_type(parameter).raw_type}}> {{parameter.name}} = Maybe<{ {resolve_type(parameter).raw_type}}>()
258 {%- else -%} 259 {%- else -%}
259 {{resolve_type(parameter).pass_type}} {{parameter.name}} 260 {{resolve_type(parameter).pass_type}} {{parameter.name}}
260 {%- endif -%}{%- if not loop.last -%}, {% endif -%} 261 {%- endif -%}{%- if not loop.last -%}, {% endif -%}
261 {%- endfor -%} 262 {%- endfor -%}
262 ); 263 );
263 {% endfor %} 264 {% endfor %}
264 265
265 void flush(); 266 void flush();
267 void sendRawNotification(const String&);
266 private: 268 private:
267 FrontendChannel* m_frontendChannel; 269 FrontendChannel* m_frontendChannel;
268 }; 270 };
269 271
270 // ------------- Dispatcher. 272 // ------------- Dispatcher.
271 273
272 class {{config.protocol.export_macro}} Dispatcher { 274 class {{config.protocol.export_macro}} Dispatcher {
273 public: 275 public:
274 static void wire(UberDispatcher*, Backend*); 276 static void wire(UberDispatcher*, Backend*);
275 277
(...skipping 12 matching lines...) Expand all
288 static const char commandPrefix[]; 290 static const char commandPrefix[];
289 static const char version[]; 291 static const char version[];
290 }; 292 };
291 293
292 } // namespace {{domain.domain}} 294 } // namespace {{domain.domain}}
293 {% for namespace in config.protocol.namespace %} 295 {% for namespace in config.protocol.namespace %}
294 } // namespace {{namespace}} 296 } // namespace {{namespace}}
295 {% endfor %} 297 {% endfor %}
296 298
297 #endif // !defined({{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h) 299 #endif // !defined({{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h)
OLDNEW
« no previous file with comments | « templates/TypeBuilder_cpp.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698