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

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

Issue 2031823002: Mojo C++ bindings: more consistent Clone() and Equals(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 // 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_path = "%s-%s"|format(module.path, variant) -%} 6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%}
7 {%- else -%} 7 {%- else -%}
8 {%- set variant_path = module.path -%} 8 {%- set variant_path = module.path -%}
9 {%- endif -%} 9 {%- endif -%}
10 10
11 {%- set header_guard = "%s_INTERNAL_H_"|format( 11 {%- set header_guard = "%s_INTERNAL_H_"|format(
12 variant_path|upper|replace("/","_")|replace(".","_")| 12 variant_path|upper|replace("/","_")|replace(".","_")|
13 replace("-", "_")) %} 13 replace("-", "_")) %}
14 14
15 #ifndef {{header_guard}} 15 #ifndef {{header_guard}}
16 #define {{header_guard}} 16 #define {{header_guard}}
17 17
18 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 18 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
19 #include "mojo/public/cpp/bindings/lib/buffer.h" 19 #include "mojo/public/cpp/bindings/lib/buffer.h"
20 #include "mojo/public/cpp/bindings/lib/serialization.h" 20 #include "mojo/public/cpp/bindings/lib/serialization.h"
21 #include "mojo/public/cpp/bindings/lib/union_accessor.h" 21 #include "mojo/public/cpp/bindings/lib/union_accessor.h"
22 #include "mojo/public/cpp/bindings/lib/value_traits.h"
23 #include "mojo/public/cpp/bindings/struct_ptr.h" 22 #include "mojo/public/cpp/bindings/struct_ptr.h"
24 23
25 {%- for import in imports %} 24 {%- for import in imports %}
26 {%- if variant %} 25 {%- if variant %}
27 #include "{{"%s-%s-internal.h"|format(import.module.path, variant)}}" 26 #include "{{"%s-%s-internal.h"|format(import.module.path, variant)}}"
28 {%- else %} 27 {%- else %}
29 #include "{{import.module.path}}-internal.h" 28 #include "{{import.module.path}}-internal.h"
30 {%- endif %} 29 {%- endif %}
31 {%- endfor %} 30 {%- endfor %}
32 31
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 109
111 } // namespace internal 110 } // namespace internal
112 {%- if variant %} 111 {%- if variant %}
113 } // namespace {{variant}} 112 } // namespace {{variant}}
114 {%- endif %} 113 {%- endif %}
115 {%- for namespace in namespaces_as_array|reverse %} 114 {%- for namespace in namespaces_as_array|reverse %}
116 } // namespace {{namespace}} 115 } // namespace {{namespace}}
117 {%- endfor %} 116 {%- endfor %}
118 117
119 #endif // {{header_guard}} 118 #endif // {{header_guard}}
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/bindings.gyp ('k') | mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698