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

Issue 2179273002: Mojo C++ bindings: support mapping T and T? differently. (Closed)

Created:
4 years, 5 months ago by yzshen1
Modified:
4 years, 4 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), 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

Mojo C++ bindings: support mapping T and T? differently. By default, when you specify typemap entry "T=CustomT", T (non-nullable) will be mapped to CustomT; while T? will be mapped to base::Optional<CustomT>. You could use attribute "nullable_is_same_type" if you want to map T/T? to the same type: "T=CustomT[nullable_is_same_type]". In this case, the corresponding StructTraits<> should implement IsNull()/SetToNull() methods. BUG=624146 Committed: https://crrev.com/289d8c4438650661530f17fbd47c8b678a98a228 Cr-Commit-Position: refs/heads/master@{#408196}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 4

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -57 lines) Patch
M components/arc/test/fake_app_instance.h View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M components/arc/test/fake_app_instance.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M device/bluetooth/public/interfaces/bluetooth_uuid.typemap View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_traits_unittest.cc View 1 3 chunks +54 lines, -9 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_with_traits.typemap View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/struct_with_traits_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_with_traits_impl.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h View 1 chunk +5 lines, -3 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/struct_with_traits.mojom View 2 chunks +9 lines, -3 lines 0 comments Download
M mojo/public/tools/bindings/generate_type_mappings.py View 2 chunks +6 lines, -7 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 3 chunks +17 lines, -12 lines 0 comments Download
M services/ui/public/cpp/lib/window_tree_client.cc View 1 2 4 1 chunk +1 line, -1 line 0 comments Download
M services/ui/public/cpp/tests/test_window_tree.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/public/cpp/tests/test_window_tree.cc View 1 2 4 1 chunk +2 lines, -2 lines 0 comments Download
M services/ui/ws/scheduled_animation_group.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/ws/window_tree.h View 1 2 4 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/ws/window_tree.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M skia/public/interfaces/skbitmap.typemap View 1 chunk +10 lines, -4 lines 0 comments Download

Messages

Total messages: 33 (20 generated)
yzshen1
Hi, Ken and Mike. Would you please take a look? Thanks! Mike: OWNER for skia ...
4 years, 5 months ago (2016-07-26 03:14:05 UTC) #4
reed1
skia lgtm
4 years, 4 months ago (2016-07-26 12:54:47 UTC) #10
Ken Rockot(use gerrit already)
change fundamentally looks good, though it seems like you need to update several more bits ...
4 years, 4 months ago (2016-07-26 15:24:19 UTC) #11
yzshen1
+more owners: Luis: please look at components/arc/ changes. Scott: please look at the changes to ...
4 years, 4 months ago (2016-07-26 20:43:50 UTC) #15
sky
https://codereview.chromium.org/2179273002/diff/60001/services/ui/public/interfaces/animations.mojom File services/ui/public/interfaces/animations.mojom (right): https://codereview.chromium.org/2179273002/diff/60001/services/ui/public/interfaces/animations.mojom#newcode25 services/ui/public/interfaces/animations.mojom:25: gfx.mojom.Transform transform; This structure is like a union, so ...
4 years, 4 months ago (2016-07-26 21:26:16 UTC) #18
yzshen1
https://codereview.chromium.org/2179273002/diff/60001/services/ui/public/interfaces/animations.mojom File services/ui/public/interfaces/animations.mojom (right): https://codereview.chromium.org/2179273002/diff/60001/services/ui/public/interfaces/animations.mojom#newcode25 services/ui/public/interfaces/animations.mojom:25: gfx.mojom.Transform transform; On 2016/07/26 21:26:16, sky wrote: > This ...
4 years, 4 months ago (2016-07-26 21:32:36 UTC) #19
dcheng
mojom LGTM once sky's concerns are addressed. I have no strong feeling about whether these ...
4 years, 4 months ago (2016-07-27 08:07:29 UTC) #20
yzshen1
On 2016/07/27 08:07:29, dcheng wrote: > mojom LGTM once sky's concerns are addressed. > > ...
4 years, 4 months ago (2016-07-27 16:13:08 UTC) #23
Luis Héctor Chávez
components/arc lgtm
4 years, 4 months ago (2016-07-27 16:30:12 UTC) #24
sky
Thanks! LGTM
4 years, 4 months ago (2016-07-27 18:22:56 UTC) #27
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/2179273002/80001
4 years, 4 months ago (2016-07-27 18:29:56 UTC) #30
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-07-27 18:34:56 UTC) #31
commit-bot: I haz the power
4 years, 4 months ago (2016-07-27 18:37:22 UTC) #33
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/289d8c4438650661530f17fbd47c8b678a98a228
Cr-Commit-Position: refs/heads/master@{#408196}

Powered by Google App Engine
This is Rietveld 408576698