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

Issue 216443002: Reland: Mojo: add javascript bindings for request/response (Closed)

Created:
6 years, 9 months ago by darin (slow to review)
Modified:
6 years, 9 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, Aaron Boodman, viettrungluu+watch_chromium.org, ben+mojo_chromium.org, abarth-chromium
Visibility:
Public.

Description

Reland: 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+414 lines, -278 lines) Patch
M content/browser/webui/web_ui_mojo_browsertest.cc View 1 2 1 chunk +1 line, -6 lines 1 comment Download
A + mojo/apps/js/bindings/connection_unittests.js View 1 3 chunks +162 lines, -57 lines 0 comments Download
D mojo/apps/js/bindings/connector_unittests.js View 1 chunk +0 lines, -132 lines 0 comments Download
M mojo/apps/js/main.js View 4 chunks +5 lines, -5 lines 0 comments Download
M mojo/apps/js/test/run_apps_js_tests.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M mojo/public/bindings/generators/js_templates/interface_definition.tmpl View 3 chunks +62 lines, -1 line 0 comments Download
M mojo/public/bindings/js/codec.js View 5 chunks +45 lines, -4 lines 0 comments Download
A + mojo/public/bindings/js/connection.js View 1 1 chunk +22 lines, -30 lines 0 comments Download
M mojo/public/bindings/js/connector.js View 3 chunks +36 lines, -30 lines 0 comments Download
A mojo/public/bindings/js/router.js View 1 chunk +75 lines, -0 lines 0 comments Download
M mojo/public/bindings/pylib/generate/mojom_generator.py View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/bindings/tests/sample_interfaces.mojom View 1 chunk +0 lines, -9 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
darin (slow to review)
https://codereview.chromium.org/216443002/diff/40001/content/browser/webui/web_ui_mojo_browsertest.cc File content/browser/webui/web_ui_mojo_browsertest.cc (right): https://codereview.chromium.org/216443002/diff/40001/content/browser/webui/web_ui_mojo_browsertest.cc#newcode170 content/browser/webui/web_ui_mojo_browsertest.cc:170: IN_PROC_BROWSER_TEST_F(WebUIMojoTest, DISABLED_EndToEnd) { This test will be re-enabled on ...
6 years, 9 months ago (2014-03-28 06:14:45 UTC) #1
darin (slow to review)
6 years, 9 months ago (2014-03-28 06:56:28 UTC) #2
Message was sent while issue was closed.
Committed patchset #3 manually as r260081 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698