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

Issue 817573003: Move wm_flow off of views and onto Sky (Closed)

Created:
6 years ago by eseidel
Modified:
5 years, 11 months ago
CC:
Elliot Glaysher, esprehn, jamesr, mojo-reviews_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Move wm_flow off of views and onto Sky This is a proof of concept for replacing ui/views code with Sky instead. erg says this will allow him to delete 10s of thousands of LOC from mojo. Mojo does not yet expose the current binary's URL: https://docs.google.com/a/chromium.org/document/d/1AQ2y6ekzvbdaMF5WrUQmneyXJnke-MnYYL4Gz1AKDos So I've worked around that by passing the url of the binary via the helper script. I discovered several bugs in the wm_flow code including that it doesn't handle view resizes (during embiggen). Related, I discovered that every time a new window is made it drops the connections to the embedded.cc app from the previous window, since the ViewManagerDelegate is incorrectly implemented as part of the ApplicationDelegate on both app.cc and embedded.cc. We'd need to split out a separate per-view object in both of those apps to handle the ViewManagerDelegate calls. There are some changes to logging during loading as well as the CopyToFile helper to have better error reporting. I hit several issues early on trying to get mojo to load the http: urls correctly, including eventually running out of disk space on my /tmp and mojo then silently failing to launch the app (due to mojo never clearing its caches crbug.com/446302). I had to re-write the mojo_demo.sh script in python as well as split the sky_server handling code out of skydb into a separate python module in order to cleanly launch sky_server. We could use a separate server if we wanted to but the primary benefit of sky_server is that it sets up the proper url->disk mappings into the generated file directories, etc. BUG=443439 R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/72d6a21732cdc95202ef9a333d9f063bf93cc534

Patch Set 1 #

Patch Set 2 : Add missing files #

Patch Set 3 : Fix to pass presubmit #

Patch Set 4 : Remove views dependency #

Patch Set 5 : Actually sorta works! #

Patch Set 6 : Use new on-* syntax #

Patch Set 7 : Mostly works #

Patch Set 8 : Nearly ready for review #

Patch Set 9 : Ready for review #

Patch Set 10 : Fix comments #

Total comments: 5

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+444 lines, -284 lines) Patch
M examples/wm_flow/BUILD.gn View 1 2 3 4 5 6 3 chunks +14 lines, -6 lines 0 comments Download
M examples/wm_flow/app/app.cc View 1 2 3 4 5 6 7 8 9 6 chunks +18 lines, -2 lines 0 comments Download
M examples/wm_flow/embedded/embedded.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M examples/wm_flow/wm/frame_controller.h View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -22 lines 0 comments Download
M examples/wm_flow/wm/frame_controller.cc View 1 2 3 4 5 6 7 8 9 2 chunks +43 lines, -114 lines 0 comments Download
A examples/wm_flow/wm/window_frame.sky View 1 2 3 4 5 6 7 8 9 10 1 chunk +84 lines, -0 lines 0 comments Download
A + examples/wm_flow/wm/window_frame_host.mojom View 1 2 1 chunk +5 lines, -2 lines 0 comments Download
M examples/wm_flow/wm/wm.cc View 1 2 3 4 5 6 7 8 5 chunks +9 lines, -16 lines 0 comments Download
M mojo/common/data_pipe_utils.cc View 1 2 3 4 5 6 7 8 3 chunks +17 lines, -2 lines 0 comments Download
A mojo/tools/mojo_demo.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download
M mojo/tools/mojo_demo.sh View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -61 lines 0 comments Download
M shell/dynamic_application_loader.cc View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
A sky/framework/embedder.sky View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
M sky/tools/skydb View 1 2 3 4 5 6 7 8 5 chunks +29 lines, -50 lines 0 comments Download
M sky/tools/skygo/sky_server.go View 1 2 3 4 5 6 7 8 9 10 2 chunks +43 lines, -6 lines 0 comments Download
M sky/tools/skygo/sky_server.sha1 View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A sky/tools/skypy/skyserver.py View 1 2 3 4 5 6 7 8 1 chunk +55 lines, -0 lines 0 comments Download
M sky/viewer/internals.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sky/viewer/internals.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (6 generated)
eseidel
6 years ago (2014-12-19 01:23:13 UTC) #1
eseidel
6 years ago (2014-12-19 01:23:29 UTC) #2
eseidel1
I'll solve the resources problem tomorrow by just making wm_flow url-hosted and have mojo_demo.sh launch ...
6 years ago (2014-12-19 02:29:40 UTC) #4
eseidel
Much closer to working. Still several problems: 1. Only the first window seems to load. ...
6 years ago (2014-12-19 21:39:46 UTC) #5
eseidel
So my issue blocking me right now is that when sky is put in a ...
6 years ago (2014-12-20 00:39:46 UTC) #6
jamesr
There's a general issue right now with transforms being applied multiple times. This code has ...
5 years, 11 months ago (2014-12-30 01:21:33 UTC) #8
eseidel
James fixed the translation error in: https://codereview.chromium.org/822903003/ The next biggest problem is that app.cc (and ...
5 years, 11 months ago (2015-01-05 22:08:09 UTC) #9
eseidel
If I remove the code which embeds sky in the view then the subviews draw ...
5 years, 11 months ago (2015-01-05 22:14:17 UTC) #10
eseidel
Nearly ready for review. I should probably land this in pieces.
5 years, 11 months ago (2015-01-06 00:11:49 UTC) #11
eseidel
I think we can start the reviewing process. I still need a solution for mapping ...
5 years, 11 months ago (2015-01-06 20:55:12 UTC) #12
jamesr
I think Scott might be a better reviewer (if he's able) - I really don't ...
5 years, 11 months ago (2015-01-06 20:56:34 UTC) #14
abarth-chromium
lgtm https://codereview.chromium.org/817573003/diff/180001/examples/wm_flow/wm/window_frame.sky File examples/wm_flow/wm/window_frame.sky (right): https://codereview.chromium.org/817573003/diff/180001/examples/wm_flow/wm/window_frame.sky#newcode69 examples/wm_flow/wm/window_frame.sky:69: return shell.wrapHandle(handle, service, client); This should be in ...
5 years, 11 months ago (2015-01-06 21:20:43 UTC) #16
eseidel
5 years, 11 months ago (2015-01-06 21:21:41 UTC) #18
sky
https://codereview.chromium.org/817573003/diff/180001/examples/wm_flow/app/app.cc File examples/wm_flow/app/app.cc (left): https://codereview.chromium.org/817573003/diff/180001/examples/wm_flow/app/app.cc#oldcode139 examples/wm_flow/app/app.cc:139: void OpenNewWindow() { view_manager_context_->Embed("mojo:wm_flow_app"); } Why do you need ...
5 years, 11 months ago (2015-01-06 21:26:56 UTC) #20
eseidel
https://codereview.chromium.org/817573003/diff/180001/examples/wm_flow/app/app.cc File examples/wm_flow/app/app.cc (left): https://codereview.chromium.org/817573003/diff/180001/examples/wm_flow/app/app.cc#oldcode139 examples/wm_flow/app/app.cc:139: void OpenNewWindow() { view_manager_context_->Embed("mojo:wm_flow_app"); } On 2015/01/06 21:26:55, sky ...
5 years, 11 months ago (2015-01-06 21:48:18 UTC) #21
eseidel
Committed patchset #11 (id:200001) manually as 72d6a21732cdc95202ef9a333d9f063bf93cc534 (presubmit successful).
5 years, 11 months ago (2015-01-06 22:40:46 UTC) #22
eseidel
5 years, 11 months ago (2015-01-06 22:47:40 UTC) #23
Message was sent while issue was closed.
Spoke with sky and beng in person.  Hopefully we'll make this path smooth. 
Loading from http urls seems inevitable given our current plans of being
ephemeral.

Powered by Google App Engine
This is Rietveld 408576698