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

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

Issue 1816703002: Mojo C++ bindings: assume that all imported mojoms have the same variant as current mojom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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" 22 #include "mojo/public/cpp/bindings/lib/value_traits.h"
23 #include "mojo/public/cpp/bindings/struct_ptr.h" 23 #include "mojo/public/cpp/bindings/struct_ptr.h"
24 {%- for header in extra_headers %} 24 {%- for header in extra_headers %}
25 #include "{{header}}" 25 #include "{{header}}"
26 {%- endfor %} 26 {%- endfor %}
27 27
28 {%- for import in imports %} 28 {%- for import in imports %}
29 {%- if variant %}
30 #include "{{"%s-%s-internal.h"|format(import.module.path, variant)}}"
31 {%- else %}
29 #include "{{import.module.path}}-internal.h" 32 #include "{{import.module.path}}-internal.h"
33 {%- endif %}
30 {%- endfor %} 34 {%- endfor %}
31 35
32 namespace mojo { 36 namespace mojo {
33 namespace internal { 37 namespace internal {
34 class BoundsChecker; 38 class BoundsChecker;
35 } 39 }
36 } 40 }
37 41
38 {%- for namespace in namespaces_as_array %} 42 {%- for namespace in namespaces_as_array %}
39 namespace {{namespace}} { 43 namespace {{namespace}} {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 103
100 } // namespace internal 104 } // namespace internal
101 {%- if variant %} 105 {%- if variant %}
102 } // namespace {{variant}} 106 } // namespace {{variant}}
103 {%- endif %} 107 {%- endif %}
104 {%- for namespace in namespaces_as_array|reverse %} 108 {%- for namespace in namespaces_as_array|reverse %}
105 } // namespace {{namespace}} 109 } // namespace {{namespace}}
106 {%- endfor %} 110 {%- endfor %}
107 111
108 #endif // {{header_guard}} 112 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698