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

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

Issue 2656583002: Remove unused typemap includes from generated C++ mojo bindings. (Closed)
Patch Set: rebase Created 3 years, 10 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 18 matching lines...) Expand all
29 } // namespace {{namespace}} 29 } // namespace {{namespace}}
30 {%- endfor %} 30 {%- endfor %}
31 {%- endmacro %} 31 {%- endmacro %}
32 32
33 #ifndef {{header_guard}} 33 #ifndef {{header_guard}}
34 #define {{header_guard}} 34 #define {{header_guard}}
35 35
36 #include <stdint.h> 36 #include <stdint.h>
37 37
38 #include <limits> 38 #include <limits>
39 {%- if structs or unions %}
39 #include <type_traits> 40 #include <type_traits>
41 {%- endif %}
40 #include <utility> 42 #include <utility>
41 43
42 #include "base/callback.h"
43 #include "base/optional.h"
44 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
45 #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h"
46 #include "mojo/public/cpp/bindings/associated_interface_request.h"
47 #include "mojo/public/cpp/bindings/interface_ptr.h"
48 #include "mojo/public/cpp/bindings/interface_request.h"
49 #include "mojo/public/cpp/bindings/lib/clone_equals_util.h"
50 #include "mojo/public/cpp/bindings/lib/control_message_handler.h"
51 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h"
52 #include "mojo/public/cpp/bindings/lib/serialization.h" 44 #include "mojo/public/cpp/bindings/lib/serialization.h"
53 #include "mojo/public/cpp/bindings/lib/union_accessor.h"
54 #include "mojo/public/cpp/bindings/native_struct.h"
55 #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"
56 #include "mojo/public/cpp/bindings/struct_ptr.h"
57 #include "mojo/public/cpp/bindings/struct_traits.h"
58 #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h"
59 #include "mojo/public/cpp/bindings/union_traits.h"
60 #include "{{module.path}}-shared.h" 45 #include "{{module.path}}-shared.h"
61 {%- for import in imports %} 46 {%- for import in imports %}
yzshen1 2017/02/02 22:33:58 I am not quite sure about the criteria what includ
62 {%- if variant %} 47 {%- if variant %}
63 #include "{{"%s-%s.h"|format(import.module.path, variant)}}" 48 #include "{{"%s-%s.h"|format(import.module.path, variant)}}"
64 {%- else %} 49 {%- else %}
65 #include "{{import.module.path}}.h" 50 #include "{{import.module.path}}.h"
66 {%- endif %} 51 {%- endif %}
67 {%- endfor %} 52 {%- endfor %}
68 {%- if not for_blink %}
69 #include <string>
70 #include <vector>
71 {%- else %}
72 {# hash_util.h includes template specializations that should be present for
73 every use of {Inlined}StructPtr. #}
74 #include "mojo/public/cpp/bindings/lib/wtf_hash_util.h"
75 #include "third_party/WebKit/Source/wtf/HashFunctions.h"
76 #include "third_party/WebKit/Source/wtf/Optional.h"
77 #include "third_party/WebKit/Source/wtf/text/WTFString.h"
78 {%- endif %}
79 53
80 {%- for header in extra_public_headers %} 54 {%- for header in public_headers %}
81 #include "{{header}}" 55 #include {{header}}
82 {%- endfor %} 56 {%- endfor %}
83 57
84 {%- if export_header %} 58 {%- if export_header %}
85 #include "{{export_header}}" 59 #include "{{export_header}}"
86 {%- endif %} 60 {%- endif %}
87 61
88 {{namespace_begin()}} 62 {{namespace_begin()}}
89 63
90 {#--- Enums #} 64 {#--- Enums #}
91 {%- if variant %} 65 {%- if variant %}
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 {#--- Union Serialization Helpers -#} 189 {#--- Union Serialization Helpers -#}
216 {% if unions %} 190 {% if unions %}
217 {%- for union in unions %} 191 {%- for union in unions %}
218 {% include "union_traits_declaration.tmpl" %} 192 {% include "union_traits_declaration.tmpl" %}
219 {%- endfor %} 193 {%- endfor %}
220 {%- endif %} 194 {%- endif %}
221 195
222 } // namespace mojo 196 } // namespace mojo
223 197
224 #endif // {{header_guard}} 198 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698