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

Issue 845593003: Pass ServiceProvider and ServiceProvider& params in Connect (Closed)

Created:
5 years, 11 months ago by jamesr
Modified:
5 years, 11 months ago
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, esprehn, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, ben+mojo_chromium.org, ojan, darin (slow to review)
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Pass ServiceProvider and ServiceProvider& params in Connect In preperation for removing the Client annotation from ServiceProvider this passes a second parameter of type ServiceProvider in the shell and application Connect calls. In this patch the type signatures are updated but the second parameter is basically unused. The intention is that the first parameter |services| will be used for the connecting application to request services from the connected application (as it does currently) and the second parameter |exported_services| be used for the connecting application to provide services to the connected application. We have very few services exported in the second direction today - I'll update them to use the second parameter in a follow-up patch. R=darin@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/3217bf35ed48e84b878057973632506a8d337f4b

Patch Set 1 #

Total comments: 4

Patch Set 2 : services & exposed_services #

Total comments: 2

Patch Set 3 : Add documentation, make application_url and requestor_url non-optional #

Patch Set 4 : update JS bindings #

Patch Set 5 : use nullptr instead of ServiceProviderPtr(), fix ShellImpl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -117 lines) Patch
M examples/bitmap_uploader/bitmap_uploader.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M examples/content_handler_demo/content_handler_demo.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M examples/ganesh_app/texture_uploader.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M mojo/application_manager/application_manager.h View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M mojo/application_manager/application_manager.cc View 1 2 3 4 6 chunks +23 lines, -22 lines 0 comments Download
M mojo/application_manager/shell_impl.h View 1 2 3 4 2 chunks +5 lines, -4 lines 0 comments Download
M mojo/application_manager/shell_impl.cc View 1 2 3 4 2 chunks +9 lines, -9 lines 0 comments Download
M mojo/gpu/gl_context.h View 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/gpu/gl_context.cc View 1 2 3 4 2 chunks +9 lines, -9 lines 0 comments Download
M mojo/public/cpp/application/application_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M mojo/public/cpp/application/lib/application_impl.cc View 1 2 chunks +11 lines, -7 lines 0 comments Download
M mojo/public/cpp/application/lib/service_registry.h View 2 chunks +3 lines, -1 line 0 comments Download
M mojo/public/cpp/application/lib/service_registry.cc View 1 chunk +9 lines, -6 lines 0 comments Download
M mojo/public/interfaces/application/application.mojom View 1 2 1 chunk +9 lines, -1 line 0 comments Download
M mojo/public/interfaces/application/shell.mojom View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M mojo/services/public/js/application.js View 1 2 3 2 chunks +10 lines, -4 lines 0 comments Download
M services/js/echo_apptest.cc View 1 2 3 1 chunk +9 lines, -1 line 0 comments Download
M shell/context.cc View 1 2 chunks +4 lines, -10 lines 0 comments Download
M shell/external_application_listener_unittest.cc View 1 2 3 4 3 chunks +8 lines, -8 lines 0 comments Download
M sky/compositor/surface_holder.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M sky/engine/v8_inspector/inspector_backend_mojo.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M sky/viewer/content_handler_impl.cc View 1 2 3 4 2 chunks +13 lines, -9 lines 0 comments Download
M sky/viewer/document_view.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M sky/viewer/document_view.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M sky/viewer/internals.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M sky/viewer/internals.cc View 1 2 3 4 2 chunks +8 lines, -5 lines 0 comments Download
M sky/viewer/services/inspector_impl.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 22 (5 generated)
jamesr
5 years, 11 months ago (2015-01-08 23:07:16 UTC) #2
darin (slow to review)
https://codereview.chromium.org/845593003/diff/1/mojo/public/interfaces/application/application.mojom File mojo/public/interfaces/application/application.mojom (right): https://codereview.chromium.org/845593003/diff/1/mojo/public/interfaces/application/application.mojom#newcode17 mojo/public/interfaces/application/application.mojom:17: ServiceProvider&? services, I'm a little confused by the use ...
5 years, 11 months ago (2015-01-09 17:31:16 UTC) #3
Aaron Boodman
https://codereview.chromium.org/845593003/diff/1/mojo/public/interfaces/application/application.mojom File mojo/public/interfaces/application/application.mojom (right): https://codereview.chromium.org/845593003/diff/1/mojo/public/interfaces/application/application.mojom#newcode16 mojo/public/interfaces/application/application.mojom:16: AcceptConnection(string? requestor_url, We should really remove the question mark. ...
5 years, 11 months ago (2015-01-09 17:53:36 UTC) #5
jamesr
On 2015/01/09 17:53:36, Aaron Boodman wrote: > These names are always confusing because they can ...
5 years, 11 months ago (2015-01-09 20:39:32 UTC) #6
darin (slow to review)
On 2015/01/09 20:39:32, jamesr wrote: > On 2015/01/09 17:53:36, Aaron Boodman wrote: > > These ...
5 years, 11 months ago (2015-01-09 20:44:50 UTC) #7
darin (slow to review)
On 2015/01/09 20:44:50, darin wrote: ... Oops, I meant to reply to my email here: ...
5 years, 11 months ago (2015-01-09 20:47:13 UTC) #8
jamesr
The reason I went with this parameter order is that currently the ServiceProvider& parameter is ...
5 years, 11 months ago (2015-01-09 20:48:47 UTC) #9
darin (slow to review)
On 2015/01/09 20:48:47, jamesr wrote: > The reason I went with this parameter order is ...
5 years, 11 months ago (2015-01-09 20:54:16 UTC) #10
jamesr
We expose the same thing on mojo.Shell, which is exposed to JS/etc. The signatures for ...
5 years, 11 months ago (2015-01-09 22:12:59 UTC) #11
jamesr
This uses ppi@'s suggestion of |services| and |exposed_services|.
5 years, 11 months ago (2015-01-12 21:48:58 UTC) #13
darin (slow to review)
LGTM https://codereview.chromium.org/845593003/diff/20001/examples/bitmap_uploader/bitmap_uploader.cc File examples/bitmap_uploader/bitmap_uploader.cc (right): https://codereview.chromium.org/845593003/diff/20001/examples/bitmap_uploader/bitmap_uploader.cc#newcode49 examples/bitmap_uploader/bitmap_uploader.cc:49: ServiceProviderPtr()); note for a future CL: we could ...
5 years, 11 months ago (2015-01-13 07:54:51 UTC) #15
jamesr
Thanks, added some comments and made the url parameters non-nullable. I'll work on the nullptr ...
5 years, 11 months ago (2015-01-13 21:48:03 UTC) #16
hansmuller1
I think the classes in mojo/services/public/js will need to be updated per this change.
5 years, 11 months ago (2015-01-13 22:17:16 UTC) #17
jamesr
Hans - could you take a look at the mojo/services/public/js and services/js/echo_apptest.cc changes?
5 years, 11 months ago (2015-01-14 00:35:34 UTC) #19
hansmuller1
On 2015/01/14 00:35:34, jamesr wrote: > Hans - could you take a look at the ...
5 years, 11 months ago (2015-01-14 22:27:31 UTC) #20
jamesr
Committed patchset #5 (id:80001) manually as 3217bf35ed48e84b878057973632506a8d337f4b (presubmit successful).
5 years, 11 months ago (2015-01-14 22:33:12 UTC) #21
hansmuller1
5 years, 11 months ago (2015-01-15 18:58:45 UTC) #22
Message was sent while issue was closed.
On 2015/01/14 22:33:12, jamesr wrote:
> Committed patchset #5 (id:80001) manually as
> 3217bf35ed48e84b878057973632506a8d337f4b (presubmit successful).

A JS bindings for null/unspecified handles is here:
https://codereview.chromium.org/825613004/

Powered by Google App Engine
This is Rietveld 408576698