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

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: 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 21 matching lines...) Expand all
46 {#--- Interface Proxies -#} 47 {#--- Interface Proxies -#}
47 {% for interface in interfaces %} 48 {% for interface in interfaces %}
48 {% include "interface_proxy_declaration.tmpl" %} 49 {% include "interface_proxy_declaration.tmpl" %}
49 {%- endfor %} 50 {%- endfor %}
50 51
51 {#--- Interface Stubs -#} 52 {#--- Interface Stubs -#}
52 {% for interface in interfaces %} 53 {% for interface in interfaces %}
53 {% include "interface_stub_declaration.tmpl" %} 54 {% include "interface_stub_declaration.tmpl" %}
54 {%- endfor %} 55 {%- endfor %}
55 56
57 {#--- Interface Request Validators -#}
58 {% for interface in interfaces %}
59 {% include "interface_request_validator_declaration.tmpl" %}
60 {%- endfor %}
61
62 {#--- Interface Response Validators -#}
63 {% for interface in interfaces if interface|has_callbacks %}
64 {% include "interface_response_validator_declaration.tmpl" %}
65 {%- endfor %}
66
56 {%- for namespace in namespaces_as_array|reverse %} 67 {%- for namespace in namespaces_as_array|reverse %}
57 } // namespace {{namespace}} 68 } // namespace {{namespace}}
58 {%- endfor %} 69 {%- endfor %}
59 70
60 {#--- Enum TypeTraits Specializations #} 71 {#--- Enum TypeTraits Specializations #}
61 {% if enums %} 72 {% if enums %}
62 namespace mojo { 73 namespace mojo {
63 namespace internal { 74 namespace internal {
64 {% for enum in enums %} 75 {% for enum in enums %}
65 {% include "enum_traits.tmpl" %} 76 {% include "enum_traits.tmpl" %}
66 {%- endfor %} 77 {%- endfor %}
67 } // namespace internal 78 } // namespace internal
68 } // namespace mojo 79 } // namespace mojo
69 {%- endif %} 80 {%- endif %}
70 81
71 #endif // {{header_guard}} 82 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698