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

Issue 686203004: Mojo JS Bindings: Simplify sharing services for content-provided JS applications (Closed)

Created:
6 years, 1 month ago by hansmuller
Modified:
6 years, 1 month ago
Reviewers:
Aaron Boodman
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Project:
mojo
Visibility:
Public.

Description

Mojo JS Bindings: Simplify sharing services for content-provided JS applications This CL was originally here: https://codereview.chromium.org/665743003 BUG=425684 R=aa@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/7144debbae398519178e3dcba9cbae58277f2361

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -35 lines) Patch
M mojo/apps/js/application_delegate_impl.h View 3 chunks +6 lines, -4 lines 0 comments Download
M mojo/apps/js/application_delegate_impl.cc View 1 chunk +4 lines, -7 lines 0 comments Download
M mojo/apps/js/content_handler_impl.cc View 3 chunks +11 lines, -3 lines 2 comments Download
M mojo/apps/js/js_app.h View 1 chunk +8 lines, -3 lines 0 comments Download
M mojo/apps/js/js_app.cc View 1 chunk +8 lines, -6 lines 0 comments Download
M mojo/apps/js/main.js View 1 chunk +1 line, -1 line 0 comments Download
M mojo/apps/js/mojo.js View 1 chunk +151 lines, -8 lines 0 comments Download
M mojo/apps/js/mojo_bridge_module.cc View 2 chunks +6 lines, -2 lines 2 comments Download
M mojo/apps/js/standalone_main.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/bindings/js/handle.h View 1 chunk +9 lines, -0 lines 0 comments Download
M mojo/bindings/js/handle.cc View 1 chunk +25 lines, -0 lines 2 comments Download
M mojo/public/js/bindings/connection.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (1 generated)
Aaron Boodman
lgtm w/ nits Just fix these and go ahead and land without another round. https://codereview.chromium.org/686203004/diff/1/mojo/apps/js/content_handler_impl.cc ...
6 years, 1 month ago (2014-10-29 23:06:29 UTC) #2
hansmuller
Committed patchset #1 (id:1) manually as 7144debbae398519178e3dcba9cbae58277f2361 (presubmit successful).
6 years, 1 month ago (2014-10-29 23:48:18 UTC) #3
hansmuller
6 years, 1 month ago (2014-10-30 00:23:38 UTC) #4
Message was sent while issue was closed.
Things that remain to be done:
- One JSApp() per OnConnect() response URL. This implies that requestor() can no
long be a global, each JSApp() may have many requestors. 
- Integration tests for a complete content-handler JS app, as well as unit tests
for the mojo module.
- Revise the tutorial/description from the original CL
https://codereview.chromium.org/665743003 and share it.
- Export the JS ServiceProvider class or something like it. It's what you get
from connectToApplication() so calling it a mojo Application might make more
sense.
- Add more handle types to js/handle.cc

https://codereview.chromium.org/686203004/diff/1/mojo/apps/js/content_handler...
File mojo/apps/js/content_handler_impl.cc (right):

https://codereview.chromium.org/686203004/diff/1/mojo/apps/js/content_handler...
mojo/apps/js/content_handler_impl.cc:18: ScopedMessagePipeHandle sp)
On 2014/10/29 23:06:28, Aaron Boodman wrote:
> You could at least make this InterfaceRequest<ServiceProvider>, and then move
> the PassMessagePipe() to initializing requestor_message_pipe_hanlde_.

Done.

https://codereview.chromium.org/686203004/diff/1/mojo/apps/js/mojo_bridge_mod...
File mojo/apps/js/mojo_bridge_module.cc (right):

https://codereview.chromium.org/686203004/diff/1/mojo/apps/js/mojo_bridge_mod...
mojo/apps/js/mojo_bridge_module.cc:1: 
On 2014/10/29 23:06:28, Aaron Boodman wrote:
> remove blank line

Done.

https://codereview.chromium.org/686203004/diff/1/mojo/bindings/js/handle.cc
File mojo/bindings/js/handle.cc (right):

https://codereview.chromium.org/686203004/diff/1/mojo/bindings/js/handle.cc#n...
mojo/bindings/js/handle.cc:89: v8::Handle<v8::Value>
Converter<mojo::MessagePipeHandle>::ToV8(
On 2014/10/29 23:06:29, Aaron Boodman wrote:
> You can just delegate to the converter for mojo::Handle:
> 
> return Converter<mojo::Handle>::ToV8(isolate, val);
> 
> Same for FromV8.

Good point!

Powered by Google App Engine
This is Rietveld 408576698