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

Issue 1083273003: Expose some sky_viewer plumbing to allow for reuse (Closed)

Created:
5 years, 8 months ago by blundell
Modified:
5 years, 6 months ago
CC:
mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Expose some sky_viewer plumbing to allow for reuse This CL exposes some of the plumbing of sky_viewer in preparation for a followup in which a content handler that handles sky *packaged* apps will share this plumbing. In particular: - SkyViewerBase: Abstract superclass for Mojo apps that are intended to be content handlers of some kind for Sky. Handles the details of setting up the Sky environment (e.g., blink::initialize()), but leaves it up to subclasses to instantiate a content handler. - SkyLoader: Loads and runs a Sky file at |url| within the context of the currently-running Mojo application, which is assumed to have set up the Sky environment properly. BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -82 lines) Patch
M sky/viewer/BUILD.gn View 5 chunks +32 lines, -9 lines 0 comments Download
M sky/viewer/content_handler_impl.cc View 3 chunks +4 lines, -34 lines 0 comments Download
A sky/viewer/sky_loader.h View 1 chunk +44 lines, -0 lines 0 comments Download
A sky/viewer/sky_loader.cc View 1 chunk +60 lines, -0 lines 0 comments Download
A sky/viewer/sky_viewer_base.h View 1 chunk +45 lines, -0 lines 0 comments Download
A sky/viewer/sky_viewer_base.cc View 1 chunk +37 lines, -0 lines 0 comments Download
M sky/viewer/viewer.cc View 1 chunk +3 lines, -39 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
blundell
5 years, 8 months ago (2015-04-16 14:04:23 UTC) #2
blundell
https://codereview.chromium.org/1085853002/ is the "consumer" of this CL.
5 years, 8 months ago (2015-04-16 14:09:54 UTC) #3
abarth-chromium
I don't think this change makes sense. We only want to have one binary in ...
5 years, 8 months ago (2015-04-16 20:54:35 UTC) #5
blundell
On 2015/04/16 20:54:35, abarth wrote: > I don't think this change makes sense. We only ...
5 years, 8 months ago (2015-04-17 12:27:15 UTC) #6
abarth-chromium
On 2015/04/17 at 12:27:15, blundell wrote: > Your understanding of the purpose of this CL ...
5 years, 8 months ago (2015-04-17 16:25:55 UTC) #7
blundell
5 years, 8 months ago (2015-04-20 15:12:25 UTC) #8
On 2015/04/17 16:25:55, abarth wrote:
> On 2015/04/17 at 12:27:15, blundell wrote:
> > Your understanding of the purpose of this CL is correct, and I agree that
the
> approach that you propose is much cleaner. I went with that approach
initially:
> see
>
https://codereview.chromium.org/1085853002/diff/40001/services/sky_packaged_a...
> (line 130). However, as qsr@ pointed out, that approach has the flaw that the
> Sky (or whatever) app that is connected to is effectively anonymous, as its
URL
> becomes http://localhost:%3Cport%3E/main.sky. Thus, any apps that that Sky app
> connected to wouldn't know who was connecting to them. This seemed to me to be
a
> fatal flaw for that approach. Do you see a way around this problem in that
> approach (or did you have something different in mind)?
> 
> Rather than spinning up a local web server to expose the contents of the
> package, we should instead have the package handler implement the
> url_loader.mojom protocol.  For example, we could introduce something like
> ServiceWorker [1] to the Mojo system to let applications work offline.  The
> package handler would then be like a ServiceWorker that serviced some URL
> requests from inside the package instead of from the network.
> 
> [1] http://www.html5rocks.com/en/tutorials/service-worker/introduction/

That's an intriguing suggestion. I opened up consideration of this issue on
mojo-dev:
https://groups.google.com/a/chromium.org/forum/#!topic/mojo-dev/OKcv1eBy7CA.

Powered by Google App Engine
This is Rietveld 408576698