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

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

Issue 1751563002: Mojo C++ bindings: support mapping mojo string to WTF::String. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync & rebase 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
(...skipping 18 matching lines...) Expand all
29 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" 29 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
30 #include "mojo/public/cpp/bindings/lib/bounds_checker.h" 30 #include "mojo/public/cpp/bindings/lib/bounds_checker.h"
31 #include "mojo/public/cpp/bindings/lib/macros.h" 31 #include "mojo/public/cpp/bindings/lib/macros.h"
32 #include "mojo/public/cpp/bindings/lib/map_data_internal.h" 32 #include "mojo/public/cpp/bindings/lib/map_data_internal.h"
33 #include "mojo/public/cpp/bindings/lib/message_builder.h" 33 #include "mojo/public/cpp/bindings/lib/message_builder.h"
34 #include "mojo/public/cpp/bindings/lib/validate_params.h" 34 #include "mojo/public/cpp/bindings/lib/validate_params.h"
35 #include "mojo/public/cpp/bindings/lib/validation_errors.h" 35 #include "mojo/public/cpp/bindings/lib/validation_errors.h"
36 #include "mojo/public/cpp/bindings/lib/validation_util.h" 36 #include "mojo/public/cpp/bindings/lib/validation_util.h"
37 #include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h" 37 #include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
38 38
39 {%- if for_blink %}
40 #include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
41 {%- endif %}
42
39 {%- for namespace in namespaces_as_array %} 43 {%- for namespace in namespaces_as_array %}
40 namespace {{namespace}} { 44 namespace {{namespace}} {
41 {%- endfor %} 45 {%- endfor %}
42 {%- if variant %} 46 {%- if variant %}
43 namespace {{variant}} { 47 namespace {{variant}} {
44 {%- endif %} 48 {%- endif %}
45 49
46 {#--- Constants #} 50 {#--- Constants #}
47 {%- for constant in module.constants %} 51 {%- for constant in module.constants %}
48 {%- if not constant.kind|is_integral_kind %} 52 {%- if not constant.kind|is_integral_kind %}
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 {%- endif %} 132 {%- endif %}
129 {%- for namespace in namespaces_as_array|reverse %} 133 {%- for namespace in namespaces_as_array|reverse %}
130 } // namespace {{namespace}} 134 } // namespace {{namespace}}
131 {%- endfor %} 135 {%- endfor %}
132 136
133 #if defined(__clang__) 137 #if defined(__clang__)
134 #pragma clang diagnostic pop 138 #pragma clang diagnostic pop
135 #elif defined(_MSC_VER) 139 #elif defined(_MSC_VER)
136 #pragma warning(pop) 140 #pragma warning(pop)
137 #endif 141 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698