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

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

Issue 273233002: Mojo cpp bindings: add support for validating incoming messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and rebase Created 6 years, 7 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_impl.h" 13 #include "mojo/public/cpp/bindings/interface_impl.h"
14 #include "mojo/public/cpp/bindings/interface_ptr.h" 14 #include "mojo/public/cpp/bindings/interface_ptr.h"
15 #include "mojo/public/cpp/bindings/message_filter.h"
15 #include "mojo/public/cpp/bindings/no_interface.h" 16 #include "mojo/public/cpp/bindings/no_interface.h"
16 #include "{{module.path}}-internal.h" 17 #include "{{module.path}}-internal.h"
17 {%- for import in imports %} 18 {%- for import in imports %}
18 #include "{{import.module.path}}.h" 19 #include "{{import.module.path}}.h"
19 {%- endfor %} 20 {%- endfor %}
20 21
21 {%- for namespace in namespaces_as_array %} 22 {%- for namespace in namespaces_as_array %}
22 namespace {{namespace}} { 23 namespace {{namespace}} {
23 {%- endfor %} 24 {%- endfor %}
24 25
(...skipping 26 matching lines...) Expand all
51 {#--- Interface Proxies -#} 52 {#--- Interface Proxies -#}
52 {% for interface in interfaces %} 53 {% for interface in interfaces %}
53 {% include "interface_proxy_declaration.tmpl" %} 54 {% include "interface_proxy_declaration.tmpl" %}
54 {%- endfor %} 55 {%- endfor %}
55 56
56 {#--- Interface Stubs -#} 57 {#--- Interface Stubs -#}
57 {% for interface in interfaces %} 58 {% for interface in interfaces %}
58 {% include "interface_stub_declaration.tmpl" %} 59 {% include "interface_stub_declaration.tmpl" %}
59 {%- endfor %} 60 {%- endfor %}
60 61
62 {#--- Interface Request Validators -#}
63 {% for interface in interfaces %}
64 {% include "interface_request_validator_declaration.tmpl" %}
65 {%- endfor %}
66
67 {#--- Interface Response Validators -#}
68 {% for interface in interfaces if interface|has_callbacks %}
69 {% include "interface_response_validator_declaration.tmpl" %}
70 {%- endfor %}
71
61 {%- for namespace in namespaces_as_array|reverse %} 72 {%- for namespace in namespaces_as_array|reverse %}
62 } // namespace {{namespace}} 73 } // namespace {{namespace}}
63 {%- endfor %} 74 {%- endfor %}
64 75
65 {#--- Enum TypeTraits Specializations #} 76 {#--- Enum TypeTraits Specializations #}
66 {% if enums %} 77 {% if enums %}
67 namespace mojo { 78 namespace mojo {
68 namespace internal { 79 namespace internal {
69 {% for enum in enums %} 80 {% for enum in enums %}
70 {% include "enum_traits.tmpl" %} 81 {% include "enum_traits.tmpl" %}
71 {%- endfor %} 82 {%- endfor %}
72 } // namespace internal 83 } // namespace internal
73 } // namespace mojo 84 } // namespace mojo
74 {%- endif %} 85 {%- endif %}
75 86
76 #endif // {{header_guard}} 87 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698