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

Issue 1085853002: Introduce Sky packaged apps. (Closed)

Created:
5 years, 8 months ago by blundell
Modified:
5 years, 6 months ago
Reviewers:
tonyg, hansmuller1, qsr, eseidel
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, darin (slow to review), jamesr, 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
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Introduce Sky packaged apps. This CL introduces Sky packaged applications, which are very similar to Dart packaged applications but run in sky_packaged_app_viewer rather than the Dart content handler. sky_packaged_app_viewer does the following: - Unzips the application into a temporary dir. - Sets up a local HttpServer and HttpHandler to serve requests for files in this temporary dir. - Loads the unpacked Sky application, treating "main.sky" as the entrypoint. An example sky_packaged_application //sky/examples/hello_world. To see it in action, run the following command after building: ./out/Debug/mojo_shell '--args-for=mojo:kiosk_wm mojo:sky_hello_world' mojo:kiosk_wm or: ./mojo/tools/android_mojo_shell '--args-for=mojo:kiosk_wm mojo:sky_hello_world' mojo:kiosk_wm

Patch Set 1 #

Patch Set 2 : Add example dart packaged app that uses Sky #

Total comments: 10

Patch Set 3 : Switch to using local http server #

Total comments: 3

Patch Set 4 : Load Sky app in sky_packaged_app_viewer, handle requests while extracting #

Total comments: 6

Patch Set 5 : Response to qsr's review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -28 lines) Patch
M DEPS View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/dart/rules.gni View 1 2 2 chunks +9 lines, -5 lines 0 comments Download
A mojo/public/sky/rules.gni View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
M services/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A services/sky_packaged_app_viewer/BUILD.gn View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
A + services/sky_packaged_app_viewer/content_handler_impl.h View 1 2 2 chunks +7 lines, -9 lines 0 comments Download
A services/sky_packaged_app_viewer/content_handler_impl.cc View 1 2 3 4 1 chunk +211 lines, -0 lines 0 comments Download
A + services/sky_packaged_app_viewer/sky_packaged_app_viewer.cc View 1 2 3 2 chunks +11 lines, -6 lines 0 comments Download
M sky/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
A + sky/examples/BUILD.gn View 1 1 chunk +4 lines, -4 lines 0 comments Download
A sky/examples/hello_world/BUILD.gn View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M sky/examples/hello_world/main.sky View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A sky/examples/hello_world/pubspec.lock View 1 1 chunk +11 lines, -0 lines 0 comments Download
A + sky/examples/hello_world/pubspec.yaml View 1 1 chunk +4 lines, -3 lines 0 comments Download
A sky/examples/stocks/pubspec.lock View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (7 generated)
blundell
Hi Eric/Tony, There are a couple cleanup TODOs for me in the code but I ...
5 years, 8 months ago (2015-04-14 14:22:03 UTC) #2
tonyg
The approach looks good to me. https://codereview.chromium.org/1085853002/diff/20001/mojo/public/dart/rules.gni File mojo/public/dart/rules.gni (right): https://codereview.chromium.org/1085853002/diff/20001/mojo/public/dart/rules.gni#newcode193 mojo/public/dart/rules.gni:193: line = "#!mojo ...
5 years, 8 months ago (2015-04-14 14:36:57 UTC) #3
hansmuller1
What's the rule for checking in pubspec.lock files? I assume that relative Dart import pathnames, ...
5 years, 8 months ago (2015-04-14 15:02:40 UTC) #5
eseidel
Why are we handling any of this inside sky? Can we just have a packaged ...
5 years, 8 months ago (2015-04-14 17:06:31 UTC) #6
blundell
Thanks for the reviews, everyone. Tony/Hans, I'll address your comments once the dust settles on ...
5 years, 8 months ago (2015-04-15 16:13:04 UTC) #8
blundell
(note that while the idea would be to generalize this content handler eventually, I would ...
5 years, 8 months ago (2015-04-15 16:14:04 UTC) #9
eseidel
This looks like it would work well to me. lgtm https://codereview.chromium.org/1085853002/diff/40001/services/sky_packaged_app_viewer/content_handler_impl.cc File services/sky_packaged_app_viewer/content_handler_impl.cc (right): https://codereview.chromium.org/1085853002/diff/40001/services/sky_packaged_app_viewer/content_handler_impl.cc#newcode129 ...
5 years, 8 months ago (2015-04-15 19:45:04 UTC) #10
qsr
https://codereview.chromium.org/1085853002/diff/40001/services/sky_packaged_app_viewer/content_handler_impl.cc File services/sky_packaged_app_viewer/content_handler_impl.cc (right): https://codereview.chromium.org/1085853002/diff/40001/services/sky_packaged_app_viewer/content_handler_impl.cc#newcode130 services/sky_packaged_app_viewer/content_handler_impl.cc:130: services.Pass(), exposed_services.Pass()); I think we should not do this. ...
5 years, 8 months ago (2015-04-15 21:56:29 UTC) #11
blundell
Thanks for the reviews! After Benjamin's comment, the latest patch now loads main.sky directly in ...
5 years, 8 months ago (2015-04-16 14:07:16 UTC) #15
qsr
https://codereview.chromium.org/1085853002/diff/120001/mojo/public/dart/rules.gni File mojo/public/dart/rules.gni (right): https://codereview.chromium.org/1085853002/diff/120001/mojo/public/dart/rules.gni#newcode192 mojo/public/dart/rules.gni:192: if (defined(invoker.uses_sky) && invoker.uses_sky) { Shouldn't this template for ...
5 years, 8 months ago (2015-04-16 16:27:33 UTC) #16
blundell
Thanks! https://codereview.chromium.org/1085853002/diff/120001/mojo/public/dart/rules.gni File mojo/public/dart/rules.gni (right): https://codereview.chromium.org/1085853002/diff/120001/mojo/public/dart/rules.gni#newcode192 mojo/public/dart/rules.gni:192: if (defined(invoker.uses_sky) && invoker.uses_sky) { On 2015/04/16 16:27:33, ...
5 years, 8 months ago (2015-04-16 18:07:56 UTC) #17
qsr
On 2015/04/16 18:07:56, blundell wrote: > Thanks! > > https://codereview.chromium.org/1085853002/diff/120001/mojo/public/dart/rules.gni > File mojo/public/dart/rules.gni (right): > ...
5 years, 8 months ago (2015-04-16 20:33:26 UTC) #18
eseidel
We can teach sky to handle file urls. But it seems a bit silly given ...
5 years, 8 months ago (2015-04-16 21:39:59 UTC) #19
qsr
On 2015/04/16 21:39:59, eseidel wrote: > We can teach sky to handle file urls. But ...
5 years, 8 months ago (2015-04-16 21:51:02 UTC) #20
eseidel
File urls have no origin and no headers and were an endless (security) headache for ...
5 years, 8 months ago (2015-04-16 21:56:51 UTC) #22
blundell
On 2015/04/16 21:56:51, eseidel wrote: > File urls have no origin and no headers and ...
5 years, 8 months ago (2015-04-17 13:12:49 UTC) #23
eseidel
5 years, 8 months ago (2015-04-20 17:13:13 UTC) #24
The Dart shell respects a PACKAGE_ROOT env variable.  Similarly I expected we
would eventually teach Sky to have the path to /packages be controllable.  For
now it's just hard-coded.

Presumably packages should be resolved relative to the root_library in Dart,
which in our case is the main.sky file.

Powered by Google App Engine
This is Rietveld 408576698