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

Issue 2225673002: Support exporting Mojo bindings for the component build. (Closed)

Created:
4 years, 4 months ago by jam
Modified:
4 years, 4 months ago
Reviewers:
esprehn, yzshen1
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, haraken, jam, kinuko+watch, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support exporting Mojo bindings for the component build. The problem is when using typemaps, the source_set for the generated bindings may include headers from components they're linking with. The export macros for those components need to match other files in the component, or else the linker warnings in the bug below are encountered. A couple of other solutions were attempted first, since they seemed simpler, but they didn't work out: -make the typemapped types be separate components: https://codereview.chromium.org/2194973002/. This wouldn't work for the weborigin example as future plans render making it a leaf-node not possible. -make the other components compile the generated bindings as part of their source: https://codereview.chromium.org/2209883002/. This solution requires the mojom target to be in the same build file as the component, which doesn't work when the issue is hit with both variants. BUG=632082 Committed: https://crrev.com/b97b473d63918a01716254be849d248a7d3eefa8 Cr-Commit-Position: refs/heads/master@{#410451}

Patch Set 1 #

Patch Set 2 : improve comments and variable naming #

Total comments: 7

Patch Set 3 : improve comments and variable naming #

Patch Set 4 : review comments #

Patch Set 5 : fix win_clang #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -26 lines) Patch
M content/common/BUILD.gn View 1 2 chunks +5 lines, -4 lines 0 comments Download
M content/test/BUILD.gn View 4 chunks +1 line, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/enum_serialization_declaration.tmpl View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_proxy_declaration.tmpl View 1 1 chunk +2 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_request_validator_declaration.tmpl View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_response_validator_declaration.tmpl View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl View 1 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl View 1 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_data_view_declaration.tmpl View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_declaration.tmpl View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 1 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/mojom.gni View 1 2 3 3 chunks +54 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/mojom_bindings_generator.py View 1 2 chunks +11 lines, -1 line 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/generator.py View 1 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 3 chunks +29 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (33 generated)
jam
4 years, 4 months ago (2016-08-08 15:24:25 UTC) #19
yzshen1
https://codereview.chromium.org/2225673002/diff/80001/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl File mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl (right): https://codereview.chromium.org/2225673002/diff/80001/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl#newcode10 mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl:10: class {{export_attribute}} {{interface.export}} {{interface.name}} { what is {{interface.export}}? https://codereview.chromium.org/2225673002/diff/80001/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl ...
4 years, 4 months ago (2016-08-08 17:07:32 UTC) #23
jam
https://codereview.chromium.org/2225673002/diff/80001/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl File mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl (right): https://codereview.chromium.org/2225673002/diff/80001/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl#newcode10 mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl:10: class {{export_attribute}} {{interface.export}} {{interface.name}} { On 2016/08/08 17:07:32, yzshen1 ...
4 years, 4 months ago (2016-08-08 17:36:08 UTC) #24
yzshen1
https://codereview.chromium.org/2225673002/diff/80001/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl File mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl (right): https://codereview.chromium.org/2225673002/diff/80001/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl#newcode6 mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl:6: struct {{export_attribute}} StructTraits<{{mojom_type}}, {{mojom_type}}Ptr> { > > - struct_data_view_declaration ...
4 years, 4 months ago (2016-08-08 17:42:16 UTC) #27
yzshen1
lgtm
4 years, 4 months ago (2016-08-08 19:26:28 UTC) #33
jam
+esprehn for webkit/ This is instead of https://codereview.chromium.org/2209883002/, which doesn't work anymore now that we ...
4 years, 4 months ago (2016-08-08 19:41:49 UTC) #35
esprehn
lgtm
4 years, 4 months ago (2016-08-08 20:09:02 UTC) #36
esprehn
btw it's nice if you wrap your change description at 80 or 100 columns.
4 years, 4 months ago (2016-08-08 20:09:19 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2225673002/160001
4 years, 4 months ago (2016-08-08 20:21:49 UTC) #40
commit-bot: I haz the power
Committed patchset #5 (id:160001)
4 years, 4 months ago (2016-08-08 20:48:53 UTC) #42
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 20:50:56 UTC) #44
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/b97b473d63918a01716254be849d248a7d3eefa8
Cr-Commit-Position: refs/heads/master@{#410451}

Powered by Google App Engine
This is Rietveld 408576698