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

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

Issue 2034273002: Mojo C++ bindings: introduce mojo::WTFMap for blink bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed the code of adding enum key support to WTF::HashMap; which turned out to be non-trivial; wi… 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
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "{{"%s-%s.h"|format(import.module.path, variant)}}" 42 #include "{{"%s-%s.h"|format(import.module.path, variant)}}"
43 {%- else %} 43 {%- else %}
44 #include "{{import.module.path}}.h" 44 #include "{{import.module.path}}.h"
45 {%- endif %} 45 {%- endif %}
46 {%- endfor %} 46 {%- endfor %}
47 {%- if not for_blink %} 47 {%- if not for_blink %}
48 #include "mojo/public/cpp/bindings/array.h" 48 #include "mojo/public/cpp/bindings/array.h"
49 #include "mojo/public/cpp/bindings/string.h" 49 #include "mojo/public/cpp/bindings/string.h"
50 {%- else %} 50 {%- else %}
51 #include "mojo/public/cpp/bindings/wtf_array.h" 51 #include "mojo/public/cpp/bindings/wtf_array.h"
52 #include "mojo/public/cpp/bindings/wtf_map.h"
52 #include "third_party/WebKit/Source/wtf/text/WTFString.h" 53 #include "third_party/WebKit/Source/wtf/text/WTFString.h"
53 {%- endif %} 54 {%- endif %}
54 55
55 {%- for header in extra_public_headers %} 56 {%- for header in extra_public_headers %}
56 #include "{{header}}" 57 #include "{{header}}"
57 {%- endfor %} 58 {%- endfor %}
58 59
59 {#--- Struct Serialization Helpers -#} 60 {#--- Struct Serialization Helpers -#}
60 {% for struct in structs %} 61 {% for struct in structs %}
61 {%- if struct|is_native_only_kind and struct|is_typemapped_kind %} 62 {%- if struct|is_native_only_kind and struct|is_typemapped_kind %}
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 {#--- Union Serialization Helpers -#} 237 {#--- Union Serialization Helpers -#}
237 {% if unions %} 238 {% if unions %}
238 {%- for union in unions %} 239 {%- for union in unions %}
239 {% include "union_serialization_declaration.tmpl" %} 240 {% include "union_serialization_declaration.tmpl" %}
240 {%- endfor %} 241 {%- endfor %}
241 {%- endif %} 242 {%- endif %}
242 243
243 } // namespace mojo 244 } // namespace mojo
244 245
245 #endif // {{header_guard}} 246 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698