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

Issue 687273002: mojo: Update content handler API (Closed)

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

Description

Patch Set 1 #

Patch Set 2 : Remove unused enum #

Patch Set 3 : Fix threading issues #

Patch Set 4 : Weakly bind DocumentViewer exported services. #

Patch Set 5 : Convert all content handlers #

Patch Set 6 : CL format #

Patch Set 7 : Remove change to mojo_demo.sh #

Patch Set 8 : Use the new content handler mechanism for js #

Total comments: 22

Patch Set 9 : Follow review #

Total comments: 3

Patch Set 10 : Keep application holder on the stack #

Patch Set 11 : Rename content_handler.h #

Total comments: 15

Patch Set 12 : Follow review #

Patch Set 13 : Follow review #

Patch Set 14 : Add missing comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+548 lines, -658 lines) Patch
M examples/content_handler_demo/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M examples/content_handler_demo/content_handler_demo.cc View 1 2 3 4 5 6 7 8 2 chunks +51 lines, -40 lines 0 comments Download
M examples/pdf_viewer/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M examples/pdf_viewer/pdf_viewer.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +44 lines, -66 lines 0 comments Download
M examples/png_viewer/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M examples/png_viewer/png_viewer.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +77 lines, -96 lines 0 comments Download
M mojo/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M mojo/application/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +14 lines, -0 lines 0 comments Download
A mojo/application/content_handler_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +66 lines, -0 lines 0 comments Download
A mojo/application/content_handler_factory.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +116 lines, -0 lines 0 comments Download
M mojo/application_manager/application_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +9 lines, -1 line 0 comments Download
M mojo/application_manager/application_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +58 lines, -15 lines 0 comments Download
M mojo/apps/js/BUILD.gn View 1 2 3 4 5 6 7 4 chunks +1 line, -20 lines 0 comments Download
D mojo/apps/js/application_delegate_impl.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -59 lines 0 comments Download
D mojo/apps/js/application_delegate_impl.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -53 lines 0 comments Download
M mojo/apps/js/content_handler_impl.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -32 lines 0 comments Download
M mojo/apps/js/content_handler_impl.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -58 lines 0 comments Download
M mojo/apps/js/content_handler_main.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +22 lines, -12 lines 0 comments Download
M mojo/apps/js/js_app.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +21 lines, -27 lines 0 comments Download
M mojo/apps/js/js_app.cc View 1 2 3 4 5 6 7 1 chunk +28 lines, -72 lines 0 comments Download
M mojo/apps/js/main.js View 1 2 3 4 5 6 7 1 chunk +1 line, -4 lines 0 comments Download
D mojo/apps/js/standalone_main.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -59 lines 0 comments Download
M mojo/services/public/interfaces/content_handler/content_handler.mojom View 1 chunk +2 lines, -4 lines 0 comments Download
M sky/viewer/content_handler_impl.h View 1 chunk +3 lines, -8 lines 0 comments Download
M sky/viewer/content_handler_impl.cc View 1 chunk +4 lines, -9 lines 0 comments Download
M sky/viewer/document_view.h View 1 2 3 4 chunks +14 lines, -10 lines 0 comments Download
M sky/viewer/document_view.cc View 1 2 3 3 chunks +13 lines, -8 lines 0 comments Download
M sky/viewer/viewer.cc View 2 chunks +1 line, -3 lines 0 comments Download

Messages

Total messages: 22 (3 generated)
qsr
Still in progress, as I didn't start looking into the js content handler. But sky ...
6 years, 1 month ago (2014-10-29 17:57:11 UTC) #2
abarth-chromium
The Sky part looks great.
6 years, 1 month ago (2014-10-30 03:02:55 UTC) #3
qsr
CL is now ready. Everything compiles and all tests pass Adding: jam for pdf_viewer abarth ...
6 years, 1 month ago (2014-10-30 15:18:06 UTC) #5
hansmuller
On 2014/10/30 15:18:06, qsr wrote: > CL is now ready. Everything compiles and all tests ...
6 years, 1 month ago (2014-10-30 15:38:59 UTC) #6
qsr
On 2014/10/30 15:38:59, hansmuller wrote: > On 2014/10/30 15:18:06, qsr wrote: > > CL is ...
6 years, 1 month ago (2014-10-30 15:48:23 UTC) #7
qsr
js content handler updated to use the new API.
6 years, 1 month ago (2014-10-30 17:45:59 UTC) #8
jam
I defer to whoever is reviewing png_handler, since I just copied that code :) Did ...
6 years, 1 month ago (2014-10-30 20:04:50 UTC) #9
abarth-chromium
//sky LGTM
6 years, 1 month ago (2014-10-31 02:23:49 UTC) #10
Aaron Boodman
Last comments inline. Also, here is a concrete suggestion for what I was talking about ...
6 years, 1 month ago (2014-10-31 08:24:01 UTC) #11
qsr
https://codereview.chromium.org/687273002/diff/140001/examples/content_handler_demo/content_handler_demo.cc File examples/content_handler_demo/content_handler_demo.cc (right): https://codereview.chromium.org/687273002/diff/140001/examples/content_handler_demo/content_handler_demo.cc#newcode24 examples/content_handler_demo/content_handler_demo.cc:24: virtual void Initialize(Array<String> args) override {} On 2014/10/31 08:24:01, ...
6 years, 1 month ago (2014-10-31 12:10:44 UTC) #12
qsr
> Also, here is a concrete suggestion for what I was talking about earlier: > ...
6 years, 1 month ago (2014-10-31 12:11:36 UTC) #13
hansmuller
//js LGTM with a few nits. https://chromiumcodereview.appspot.com/687273002/diff/200001/mojo/apps/js/content_handler_main.cc File mojo/apps/js/content_handler_main.cc (right): https://chromiumcodereview.appspot.com/687273002/diff/200001/mojo/apps/js/content_handler_main.cc#newcode32 mojo/apps/js/content_handler_main.cc:32: virtual bool ConfigureIncomingConnection( ...
6 years, 1 month ago (2014-10-31 16:14:44 UTC) #14
qsr
https://chromiumcodereview.appspot.com/687273002/diff/200001/mojo/apps/js/content_handler_main.cc File mojo/apps/js/content_handler_main.cc (right): https://chromiumcodereview.appspot.com/687273002/diff/200001/mojo/apps/js/content_handler_main.cc#newcode32 mojo/apps/js/content_handler_main.cc:32: virtual bool ConfigureIncomingConnection( On 2014/10/31 16:14:44, hansmuller wrote: > ...
6 years, 1 month ago (2014-10-31 16:31:36 UTC) #15
Aaron Boodman
https://codereview.chromium.org/687273002/diff/160001/mojo/application/content_handler.cc File mojo/application/content_handler.cc (right): https://codereview.chromium.org/687273002/diff/160001/mojo/application/content_handler.cc#newcode41 mojo/application/content_handler.cc:41: base::MessageLoop loop(common::MessagePumpMojo::Create()); I thought you wanted to support content ...
6 years, 1 month ago (2014-10-31 16:40:46 UTC) #16
Aaron Boodman
lgtm w/ above
6 years, 1 month ago (2014-10-31 16:42:04 UTC) #17
qsr
https://codereview.chromium.org/687273002/diff/200001/mojo/application/content_handler_factory.h File mojo/application/content_handler_factory.h (right): https://codereview.chromium.org/687273002/diff/200001/mojo/application/content_handler_factory.h#newcode27 mojo/application/content_handler_factory.h:27: // content. The application will be run on its ...
6 years, 1 month ago (2014-10-31 17:22:32 UTC) #18
qsr
Committed patchset #14 (id:260001) manually as 7c05714462a1f2c668dd3946d953cc36aa685bfc.
6 years, 1 month ago (2014-10-31 17:23:14 UTC) #19
jamesr
This landed with a commit message that just said "WIP". Please write more descriptive messages ...
6 years, 1 month ago (2014-10-31 17:44:44 UTC) #21
Aaron Boodman
6 years, 1 month ago (2014-10-31 18:43:18 UTC) #22
Message was sent while issue was closed.
https://codereview.chromium.org/687273002/diff/200001/mojo/application_manage...
File mojo/application_manager/application_manager.cc (right):

https://codereview.chromium.org/687273002/diff/200001/mojo/application_manage...
mojo/application_manager/application_manager.cc:122:
WeakBindToProxy(&service_provider_impl, &service_provider);
On 2014/10/31 17:22:32, qsr wrote:
> On 2014/10/31 16:40:46, Aaron Boodman wrote:
> > Alternately, what if we just don't hold onto the ServiceProviderImpl?
> > 
> > BindToProxy(new ServiceProviderImpl(), &service_provider)
> > 
> > We don't need the SPImpl for anything once we have the content handler, and
> > perhaps not retaining it in this structure simplifies understanding the
code.
> 
>  But then you can imagine the service provider surviving the shell if the
other
> side doesn't kill it. Which seems weird to me...

What is the problem with that? If the app somehow drops its ShellPtr, but
doesn't drop the ServiceProviderPtr, then it will be able to make requests to
it, but we're not providing anything over it.

The more I work with Mojo, the more idiomatic it feels to not try and tie
different pipe's lifetimes together... precisely because of what you are
pointing out: the other side can always drop their side of the various pipes in
unexpected order.

Powered by Google App Engine
This is Rietveld 408576698