DescriptionReland: Mojo: add javascript bindings for request/response
If a mojom interface method specifies response parameters, then we'll generate javascript bindings that provide an additional callback parameter used to pass the response parameters. This mirrors the C++ implementation.
A future improvement will likely be to use promises instead, especially now that they are enabled on trunk.
As part of this CL, connector.js was also made consistent with connector.cc. It starts reading the message pipe immediately, handles write failures in a similar fashion, etc.
The Connection type from connector.js is factored out into a separate file as it now holds a Router object. router.js mirrors router.cc. The Connection type is really the mirror of the C++ RemotePtr<S> type.
Some basic request/response tests were added to connection_unittests.js. We'll probably want more testing.
R=abarth@chromium.org
TBR=mpcomplete@chromium.org
Originally reviewed at https://codereview.chromium.org/207503004/
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260081
Patch Set 1 #Patch Set 2 : --similarity=15 #Patch Set 3 : Disable WebUIMojoTest.EndToEnd #
Total comments: 1
Messages
Total messages: 2 (0 generated)
|