|
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}
Total comments: 4
|
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
|
Total messages: 33 (20 generated)
|