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

Side by Side Diff: mojo/public/bindings/generators/cpp_templates/module.h.tmpl

Issue 224873002: Makes it so mojom files don't need a module (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove viewmanager hack Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 {%- set header_guard = "%s_H_"| 5 {%- set header_guard = "%s_H_"|
6 format(module.path|upper|replace("/","_")|replace(".","_")) %} 6 format(module.path|upper|replace("/","_")|replace(".","_")) %}
7 7
8 #ifndef {{header_guard}} 8 #ifndef {{header_guard}}
9 #define {{header_guard}} 9 #define {{header_guard}}
10 10
11 #include "mojo/public/cpp/bindings/array.h" 11 #include "mojo/public/cpp/bindings/array.h"
12 #include "mojo/public/cpp/bindings/callback.h" 12 #include "mojo/public/cpp/bindings/callback.h"
13 #include "mojo/public/cpp/bindings/interface.h" 13 #include "mojo/public/cpp/bindings/interface.h"
14 #include "{{module.path}}-internal.h" 14 #include "{{module.path}}-internal.h"
15 {%- for import in imports %} 15 {%- for import in imports %}
16 #include "{{import.module.path}}.h" 16 #include "{{import.module.path}}.h"
17 {%- endfor %} 17 {%- endfor %}
18 18
19 {%- if namespace %}
19 namespace {{namespace}} { 20 namespace {{namespace}} {
21 {%- endif %}
20 22
21 {#--- Enums #} 23 {#--- Enums #}
22 {% for enum in enums %} 24 {% for enum in enums %}
23 {% include "enum_declaration.tmpl" %} 25 {% include "enum_declaration.tmpl" %}
24 {%- endfor %} 26 {%- endfor %}
25 27
26 {#--- Structs #} 28 {#--- Structs #}
27 {% for struct in structs %} 29 {% for struct in structs %}
28 {% include "wrapper_class_declaration.tmpl" %} 30 {% include "wrapper_class_declaration.tmpl" %}
29 {%- endfor %} 31 {%- endfor %}
30 32
31 {#--- Interfaces -#} 33 {#--- Interfaces -#}
32 {% for interface in interfaces %} 34 {% for interface in interfaces %}
33 {% include "interface_declaration.tmpl" %} 35 {% include "interface_declaration.tmpl" %}
34 {%- endfor %} 36 {%- endfor %}
35 37
36 {#--- Interface Proxies -#} 38 {#--- Interface Proxies -#}
37 {% for interface in interfaces %} 39 {% for interface in interfaces %}
38 {% include "interface_proxy_declaration.tmpl" %} 40 {% include "interface_proxy_declaration.tmpl" %}
39 {%- endfor %} 41 {%- endfor %}
40 42
41 {#--- Interface Stubs -#} 43 {#--- Interface Stubs -#}
42 {% for interface in interfaces %} 44 {% for interface in interfaces %}
43 {% include "interface_stub_declaration.tmpl" %} 45 {% include "interface_stub_declaration.tmpl" %}
44 {%- endfor %} 46 {%- endfor %}
45 47
48 {%- if namespace %}
46 } // namespace {{namespace}} 49 } // namespace {{namespace}}
50 {%- endif %}
47 51
48 #endif // {{header_guard}} 52 #endif // {{header_guard}}
OLDNEW
« no previous file with comments | « mojo/public/bindings/generators/cpp_templates/module.cc.tmpl ('k') | mojo/public/bindings/pylib/parse/mojo_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698