Implement features listed in the design doc https://docs.google.com/document/d/1nq3J_HbS-gvVfIoEhcVyxm1uY-9G_7lhD-4Kyxb1WIY/edit#heading=h.y4w0psk6sl9o As well as reflect the simplified associated interface API changes from Bug 682334
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486 commit 087549eb773ef4b5fd43b5bd57f1a9ddfceeb486 Author: wangjimmy <wangjimmy@chromium.org> Date: Thu Mar 30 17:49:57 2017 Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and PipeControlMessage Handler/Proxy. Move accept message and handling code from Router to IEC. There is still only 1 interface on a message pipe, but this work helps setup for associated interfaces. BUG=695635 Review-Url: https://codereview.chromium.org/2744963002 Cr-Commit-Position: refs/heads/master@{#460817} [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/content/content_resources.grd [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/content/renderer/mojo_context_state.cc [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/content/renderer/render_frame_impl.cc [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/extensions/renderer/api_test_base.cc [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/extensions/renderer/dispatcher.cc [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/ios/web/ios_web_resources.grd [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/ios/web/webui/crw_web_ui_manager.mm [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/ios/web/webui/mojo_js_constants.cc [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/ios/web/webui/mojo_js_constants.h [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/ios/web/webui/resources/console.js [add] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/ios/web/webui/resources/timer.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/edk/js/tests/run_js_unittests.cc [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/BUILD.gn [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/bindings.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/codec.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/connector.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/constants.cc [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/constants.h [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/interface_types.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/lib/control_message_handler.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/lib/control_message_proxy.js [add] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/lib/interface_endpoint_client.js [add] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/lib/interface_endpoint_handle.js [add] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/lib/pipe_control_message_handler.js [add] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/lib/pipe_control_message_proxy.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/router.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/tests/validation_unittest.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/js/validator.js [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/third_party/WebKit/LayoutTests/mojo/binding.html [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/third_party/WebKit/LayoutTests/mojo/connection.html [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/third_party/WebKit/LayoutTests/mojo/interface_ptr.html [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/third_party/WebKit/LayoutTests/vibration/vibration-expected.txt [modify] https://crrev.com/087549eb773ef4b5fd43b5bd57f1a9ddfceeb486/third_party/WebKit/LayoutTests/vibration/vibration-iframe-expected.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/336e07d78b075a81a7debb521f167bd4dfd93ade commit 336e07d78b075a81a7debb521f167bd4dfd93ade Author: wangjimmy <wangjimmy@chromium.org> Date: Thu Apr 13 18:46:32 2017 Add validation conformance tests for associated interfaces. Add encoding, decoding and validation for associated interfaces. Modified Mojo js tmpls to support associated interfaces (encode, decode, default values, validation). Added codec.AssociatedInterfacePtrInfo and codec.AssociatedInterfaceRequest. Modify validator.js validateMessageHeader() to validate v2 messages. Add to validator.js validateAssociatedInterface & validateAssociatedInterfaceRequest. Modify validator.js validateArray(...) to validate array of associated InterfacePtrInfo/InterfaceRequest. BUG=695635 Review-Url: https://codereview.chromium.org/2796253002 Cr-Commit-Position: refs/heads/master@{#464478} [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/content/content_resources.grd [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/content/renderer/mojo_context_state.cc [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/extensions/renderer/dispatcher.cc [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/ios/web/ios_web_resources.grd [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/ios/web/webui/crw_web_ui_manager.mm [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/edk/js/tests/BUILD.gn [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/BUILD.gn [add] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/associated_bindings.js [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/codec.js [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/constants.cc [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/constants.h [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/interface_types.js [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/tests/validation_unittest.js [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/js/validator.js [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/mojo/public/tools/bindings/generators/mojom_js_generator.py [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/third_party/WebKit/LayoutTests/mojo/struct.html [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/third_party/WebKit/LayoutTests/mojo/union.html [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/third_party/WebKit/LayoutTests/vibration/vibration-expected.txt [modify] https://crrev.com/336e07d78b075a81a7debb521f167bd4dfd93ade/third_party/WebKit/LayoutTests/vibration/vibration-iframe-expected.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6aabe530831aad419602e06ba5ac364ca18dc862 commit 6aabe530831aad419602e06ba5ac364ca18dc862 Author: wangjimmy <wangjimmy@chromium.org> Date: Sat Apr 22 03:06:11 2017 Add associated interfaces & bindings. Add message serialize and deserialize associated endpoint handles. Add new MessageV2Builder, add encode and decode for associated endpoint handles. Modify tmpl to generate AssociatedInterfacePtr and use MessageV2Builder. Add associated_interface_ptr.html layout test to test encoding/decoding. BUG=695635 Review-Url: https://codereview.chromium.org/2820783002 Cr-Commit-Position: refs/heads/master@{#466531} [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/BUILD.gn [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/interfaces/bindings/tests/test_associated_interfaces.mojom [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/associated_bindings.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/bindings.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/codec.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/lib/control_message_handler.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/lib/control_message_proxy.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/lib/interface_endpoint_client.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/lib/interface_endpoint_handle.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/lib/pipe_control_message_proxy.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/new_bindings/codec.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/new_bindings/lib/control_message_handler.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/new_bindings/lib/control_message_proxy.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/router.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/js/validator.js [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/tools/bindings/generators/mojom_js_generator.py [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/mojo/public/tools/bindings/pylib/mojom/generate/module.py [add] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/third_party/WebKit/LayoutTests/mojo/codec.html [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/third_party/WebKit/LayoutTests/mojo/struct.html [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/third_party/WebKit/LayoutTests/mojo/union.html [modify] https://crrev.com/6aabe530831aad419602e06ba5ac364ca18dc862/third_party/WebKit/LayoutTests/vibration/vibration-expected.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d65d570dafc96e2f12abe682c7148a350a94dc52 commit d65d570dafc96e2f12abe682c7148a350a94dc52 Author: wangjimmy <wangjimmy@chromium.org> Date: Wed Apr 26 20:09:57 2017 Fifo order should be preserved for messages on associated interfaces. Cache the current message and pause processing the incoming messages if an endpoint does not have client attached yet. Resume processing the incoming messages when the endpoint client is attached to that endpoint. // Expect arrival of message with value 456, then message with value 123. integerSender1.send(456) // Binding side not bound yet so no endpoint client. integerSender0.send(123) BUG=695635 Review-Url: https://codereview.chromium.org/2832303002 Cr-Commit-Position: refs/heads/master@{#467427} [modify] https://crrev.com/d65d570dafc96e2f12abe682c7148a350a94dc52/mojo/public/interfaces/bindings/tests/test_associated_interfaces.mojom [modify] https://crrev.com/d65d570dafc96e2f12abe682c7148a350a94dc52/mojo/public/js/connector.js [modify] https://crrev.com/d65d570dafc96e2f12abe682c7148a350a94dc52/mojo/public/js/router.js [modify] https://crrev.com/d65d570dafc96e2f12abe682c7148a350a94dc52/third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/440629589dbc6ed4fb54dbcc616bca0c06d88632 commit 440629589dbc6ed4fb54dbcc616bca0c06d88632 Author: wangjimmy <wangjimmy@chromium.org> Date: Thu Apr 27 07:08:27 2017 Add ResetWithReason for AssociatedInterfaceRequest. Add 'pending AssociatedInterfacePtr connection error with reason' test to associated_interface_ptr.html BUG=695635 Review-Url: https://codereview.chromium.org/2843183002 Cr-Commit-Position: refs/heads/master@{#467614} [modify] https://crrev.com/440629589dbc6ed4fb54dbcc616bca0c06d88632/mojo/public/js/interface_types.js [modify] https://crrev.com/440629589dbc6ed4fb54dbcc616bca0c06d88632/third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2e7fbc6d817dc0307b5e64992590114b10566f7e commit 2e7fbc6d817dc0307b5e64992590114b10566f7e Author: wangjimmy <wangjimmy@chromium.org> Date: Fri Apr 28 03:25:17 2017 Add encounteredError() to AssociatedInterfacePtrController. Indicates whether an error has been encountered by the interface endpoint client. If true, method calls made on this interface will be dropped (and may already have been dropped). BUG=695635 Review-Url: https://codereview.chromium.org/2840333002 Cr-Commit-Position: refs/heads/master@{#467869} [modify] https://crrev.com/2e7fbc6d817dc0307b5e64992590114b10566f7e/mojo/public/js/associated_bindings.js [modify] https://crrev.com/2e7fbc6d817dc0307b5e64992590114b10566f7e/mojo/public/js/lib/interface_endpoint_client.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/46cdc9add2a99d8e664df0e8ed4e55df530c48d1 commit 46cdc9add2a99d8e664df0e8ed4e55df530c48d1 Author: wangjimmy <wangjimmy@chromium.org> Date: Mon May 01 05:10:37 2017 Add associated binding set. Add associated_binding.html layout test. BUG=695635 Review-Url: https://codereview.chromium.org/2844133003 Cr-Commit-Position: refs/heads/master@{#468288} [modify] https://crrev.com/46cdc9add2a99d8e664df0e8ed4e55df530c48d1/mojo/public/js/associated_bindings.js [modify] https://crrev.com/46cdc9add2a99d8e664df0e8ed4e55df530c48d1/mojo/public/js/bindings.js [add] https://crrev.com/46cdc9add2a99d8e664df0e8ed4e55df530c48d1/third_party/WebKit/LayoutTests/mojo/associated_binding.html
Comment 1 by bugdroid1@chromium.org
, Mar 30 2017