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

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

Issue 2247083003: Mojo C++ bindings: extract code shared by different variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
index c27708ffd6f48a0afa60f664d427b705bfa28864..edab4c256736a5043b34013961e76508de4e2c89 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
@@ -26,13 +26,11 @@
#include "base/logging.h"
#include "base/trace_event/trace_event.h"
-#include "mojo/public/cpp/bindings/lib/map_data_internal.h"
#include "mojo/public/cpp/bindings/lib/message_builder.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_context.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
-#include "mojo/public/cpp/bindings/lib/validation_util.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
{%- if for_blink %}
@@ -57,45 +55,6 @@ const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_val
{%- endif %}
{%- endfor %}
-namespace internal {
-namespace {
-
-#pragma pack(push, 1)
-
-{#--- Interface parameter definitions #}
-{%- for interface in interfaces %}
-{%- for method in interface.methods %}
-{%- set method_name = "k%s_%s_Name"|format(interface.name, method.name) %}
-const uint32_t {{method_name}} = {{method.ordinal}};
-{% set struct = method.param_struct %}
-{% include "struct_declaration.tmpl" %}
-{%- include "struct_definition.tmpl" %}
-{%- if method.response_parameters != None %}
-{%- set struct = method.response_param_struct %}
-{% include "struct_declaration.tmpl" %}
-{%- include "struct_definition.tmpl" %}
-{%- endif %}
-{%- endfor %}
-{%- endfor %}
-
-#pragma pack(pop)
-
-} // namespace
-
-{#--- Struct definitions #}
-{% for struct in structs %}
-{%- if not struct|is_native_only_kind %}
-{%- include "struct_definition.tmpl" %}
-{%- endif %}
-{%- endfor %}
-
-{#--- Union definitions #}
-{% for union in unions %}
-{%- include "union_definition.tmpl" %}
-{%- endfor %}
-
-} // namespace internal
-
namespace {
{#--- Interface parameter data view definitions #}

Powered by Google App Engine
This is Rietveld 408576698