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

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

Issue 1518293002: [mojo] Add Mojo bindings support for IPC::ParamTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pickle4
Patch Set: Created 5 years 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 // 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 {%- if variant -%} 5 {%- if variant -%}
6 {%- set variant_suffix = "-%s"|format(variant) -%} 6 {%- set variant_suffix = "-%s"|format(variant) -%}
7 {%- else -%} 7 {%- else -%}
8 {%- set variant_suffix = "" -%} 8 {%- set variant_suffix = "" -%}
9 {%- endif %} 9 {%- endif %}
10 10
11 {%- set header_guard = "%s_INTERNAL_H_"| 11 {%- set header_guard = "%s_INTERNAL_H_"|
12 format((module.path + variant_suffix)|upper|replace("/","_")|replace("." ,"_")|replace("-","_")) %} 12 format((module.path + variant_suffix)|upper|replace("/","_")|replace("." ,"_")|replace("-","_")) %}
13 13
14 #ifndef {{header_guard}} 14 #ifndef {{header_guard}}
15 #define {{header_guard}} 15 #define {{header_guard}}
16 16
17 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 17 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
18 #include "mojo/public/cpp/bindings/lib/buffer.h" 18 #include "mojo/public/cpp/bindings/lib/buffer.h"
19 #include "mojo/public/cpp/bindings/lib/native_serialization.h"
19 #include "mojo/public/cpp/bindings/lib/union_accessor.h" 20 #include "mojo/public/cpp/bindings/lib/union_accessor.h"
20 #include "mojo/public/cpp/bindings/lib/value_traits.h" 21 #include "mojo/public/cpp/bindings/lib/value_traits.h"
21 #include "mojo/public/cpp/bindings/struct_ptr.h" 22 #include "mojo/public/cpp/bindings/struct_ptr.h"
23 {%- for header in extra_headers %}
24 #include "{{header}}"
25 {%- endfor %}
22 26
23 {%- for import in imports %} 27 {%- for import in imports %}
24 #include "{{import.module.path}}{{variant_suffix}}-internal.h" 28 #include "{{import.module.path}}{{variant_suffix}}-internal.h"
25 {%- endfor %} 29 {%- endfor %}
26 30
27 namespace mojo { 31 namespace mojo {
28 namespace internal { 32 namespace internal {
29 class BoundsChecker; 33 class BoundsChecker;
30 } 34 }
31 } 35 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 79
76 } // namespace internal 80 } // namespace internal
77 {% if variant %} 81 {% if variant %}
78 } // namespace {{variant}} 82 } // namespace {{variant}}
79 {%- endif %} 83 {%- endif %}
80 {%- for namespace in namespaces_as_array|reverse %} 84 {%- for namespace in namespaces_as_array|reverse %}
81 } // namespace {{namespace}} 85 } // namespace {{namespace}}
82 {%- endfor %} 86 {%- endfor %}
83 87
84 #endif // {{header_guard}} 88 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698