summaryrefslogtreecommitdiffstats
path: root/mojo/mojo_public.gypi
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 19:00:36 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 19:00:36 +0000
commit2b4e10f4dcd668a1e0ba3b800672e1ba4e6909de (patch)
treed17edf8877cdb821d779b71fe34cdf3a31bc98e9 /mojo/mojo_public.gypi
parent27ac8181e1fc50ef07518148b113028f39d41faa (diff)
downloadchromium_src-2b4e10f4dcd668a1e0ba3b800672e1ba4e6909de.zip
chromium_src-2b4e10f4dcd668a1e0ba3b800672e1ba4e6909de.tar.gz
chromium_src-2b4e10f4dcd668a1e0ba3b800672e1ba4e6909de.tar.bz2
Mojo: more idiomatic C++ bindings
This change eliminates AllocationScope in favor of heap allocating the "wrapper" classes, which are now no longer wrappers in the true sense but rather deep copies of the archived structs. We still use the term "wrapper" in the code generator. With this design, the fact that structs are encoded as pointers (that may be null) is more apparent. For example, a Foo struct may be allocated and stored in a FooPtr. The FooPtr implements move-only semantics. This is because some of the members of Foo may be move-only (e.g., handles). Strings are now just thin wrappers around std::string that impose nullability and a more restrictive API. It is not possible to mutate the elements of a string after it has been created. String acts like a pointer to a possibly null array of characters, which is very similar to a char*. Arrays are now just thin wrappers around std::vector that impose nullability and a more restrictive API. Unlike String, Array does support mutation of its elements after creation, but there is no support for resizing an array. (We can add support for push_back and resize if needed.) BUG=365922 R=yzshen@chromium.org Review URL: https://codereview.chromium.org/294833002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/mojo_public.gypi')
-rw-r--r--mojo/mojo_public.gypi14
1 files changed, 6 insertions, 8 deletions
diff --git a/mojo/mojo_public.gypi b/mojo/mojo_public.gypi
index 22e208b..266b8bf 100644
--- a/mojo/mojo_public.gypi
+++ b/mojo/mojo_public.gypi
@@ -139,6 +139,8 @@
'public/cpp/bindings/tests/request_response_unittest.cc',
'public/cpp/bindings/tests/router_unittest.cc',
'public/cpp/bindings/tests/sample_service_unittest.cc',
+ 'public/cpp/bindings/tests/string_unittest.cc',
+ 'public/cpp/bindings/tests/struct_unittest.cc',
'public/cpp/bindings/tests/type_conversion_unittest.cc',
'public/cpp/bindings/tests/validation_unittest.cc',
],
@@ -233,16 +235,15 @@
'public/cpp/bindings/message.h',
'public/cpp/bindings/message_filter.h',
'public/cpp/bindings/no_interface.h',
- 'public/cpp/bindings/passable.h',
+ 'public/cpp/bindings/string.h',
'public/cpp/bindings/sync_dispatcher.h',
'public/cpp/bindings/type_converter.h',
- 'public/cpp/bindings/lib/array.cc',
'public/cpp/bindings/lib/array_internal.h',
'public/cpp/bindings/lib/array_internal.cc',
+ 'public/cpp/bindings/lib/array_serialization.h',
'public/cpp/bindings/lib/bindings_internal.h',
'public/cpp/bindings/lib/bindings_serialization.cc',
'public/cpp/bindings/lib/bindings_serialization.h',
- 'public/cpp/bindings/lib/buffer.cc',
'public/cpp/bindings/lib/callback_internal.h',
'public/cpp/bindings/lib/connector.cc',
'public/cpp/bindings/lib/connector.h',
@@ -264,10 +265,10 @@
'public/cpp/bindings/lib/no_interface.cc',
'public/cpp/bindings/lib/router.cc',
'public/cpp/bindings/lib/router.h',
- 'public/cpp/bindings/lib/scratch_buffer.cc',
- 'public/cpp/bindings/lib/scratch_buffer.h',
'public/cpp/bindings/lib/shared_data.h',
'public/cpp/bindings/lib/shared_ptr.h',
+ 'public/cpp/bindings/lib/string_serialization.h',
+ 'public/cpp/bindings/lib/string_serialization.cc',
'public/cpp/bindings/lib/sync_dispatcher.cc',
],
},
@@ -306,12 +307,9 @@
'target_name': 'mojo_environment_standalone',
'type': 'static_library',
'sources': [
- 'public/cpp/environment/buffer_tls.h',
'public/cpp/environment/default_async_waiter.h',
'public/cpp/environment/environment.h',
'public/cpp/environment/lib/default_async_waiter.cc',
- 'public/cpp/environment/lib/buffer_tls.cc',
- 'public/cpp/environment/lib/buffer_tls_setup.h',
'public/cpp/environment/lib/environment.cc',
],
'include_dirs': [