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

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template

Issue 2253383002: [DevTools] Schema domain implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: schema Created 4 years, 3 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 // 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 #include "{{config.protocol.package}}/{{domain.domain}}.h" 7 #include "{{config.protocol.package}}/{{domain.domain}}.h"
8 8
9 namespace blink { 9 namespace blink {
10 namespace protocol { 10 namespace protocol {
11 namespace {{domain.domain}} { 11 namespace {{domain.domain}} {
12 12
13 // ------------- Enum values from types. 13 // ------------- Enum values from types.
14 14
15 const char Metainfo::domainName[] = "{{domain.domain}}"; 15 const char Metainfo::domainName[] = "{{domain.domain}}";
16 const char Metainfo::commandPrefix[] = "{{domain.domain}}."; 16 const char Metainfo::commandPrefix[] = "{{domain.domain}}.";
17 const char Metainfo::version[] = "{{domain.version}}";
17 {% for type in domain.types %} 18 {% for type in domain.types %}
18 {% if "enum" in type %} 19 {% if "enum" in type %}
19 20
20 namespace {{type.id}}Enum { 21 namespace {{type.id}}Enum {
21 {% for literal in type.enum %} 22 {% for literal in type.enum %}
22 const char* {{ literal | dash_to_camelcase}} = "{{literal}}"; 23 const char* {{ literal | dash_to_camelcase}} = "{{literal}}";
23 {% endfor %} 24 {% endfor %}
24 } // namespace {{type.id}}Enum 25 } // namespace {{type.id}}Enum
25 {% if type.exported %} 26 {% if type.exported %}
26 27
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 340
340 // static 341 // static
341 void Dispatcher::wire(UberDispatcher* dispatcher, Backend* backend) 342 void Dispatcher::wire(UberDispatcher* dispatcher, Backend* backend)
342 { 343 {
343 dispatcher->registerBackend("{{domain.domain}}", wrapUnique(new DispatcherIm pl(dispatcher->channel(), backend))); 344 dispatcher->registerBackend("{{domain.domain}}", wrapUnique(new DispatcherIm pl(dispatcher->channel(), backend)));
344 } 345 }
345 346
346 } // {{domain.domain}} 347 } // {{domain.domain}}
347 } // namespace protocol 348 } // namespace protocol
348 } // namespace blink 349 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698