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

Issue 608333002: Standalone Mojo Javascript application (Closed)

Created:
6 years, 2 months ago by hansmuller
Modified:
6 years, 2 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Standalone Mojo Javascript application Refactored the JSApp et al classes to enable launching apps with the content launcher (as before) as well as launching a single standalone JS app. The content handler class has been moved to its own file. The part of the JSApp Start() method that loads the initial script is now an abstract method called Load(). There are content handler and standalone versions of JSApp::Load(). The code that's specific to the standalone case is now in standalone_main.cc. The code that's specific to the content handler case is in content_handler_main.cc and content_handler_impl.{h,cc}. Currently the standalone app's filename is wired into standalone_main.cc. Once crbug.com/418797 has been fixed the filename can be passed through mojo_shell. BUG=417530 Committed: https://crrev.com/06c28d7358731ae3a7788656a7c7468b813a4b3e Cr-Commit-Position: refs/heads/master@{#297675}

Patch Set 1 : Standalone Mojo application #

Total comments: 12

Patch Set 2 : Reorganized includes etc per review feedback #

Patch Set 3 : Fixed the GN build #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+325 lines, -135 lines) Patch
M mojo/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M mojo/apps/js/BUILD.gn View 1 2 1 chunk +48 lines, -19 lines 0 comments Download
M mojo/apps/js/application_delegate_impl.h View 1 2 chunks +15 lines, -30 lines 0 comments Download
M mojo/apps/js/application_delegate_impl.cc View 2 chunks +3 lines, -24 lines 0 comments Download
A mojo/apps/js/content_handler_impl.h View 1 1 chunk +33 lines, -0 lines 0 comments Download
A mojo/apps/js/content_handler_impl.cc View 1 chunk +56 lines, -0 lines 0 comments Download
A mojo/apps/js/content_handler_main.cc View 1 1 chunk +42 lines, -0 lines 0 comments Download
M mojo/apps/js/js_app.h View 3 chunks +17 lines, -13 lines 0 comments Download
M mojo/apps/js/js_app.cc View 1 5 chunks +20 lines, -26 lines 0 comments Download
D mojo/apps/js/main.cc View 1 chunk +0 lines, -15 lines 0 comments Download
A mojo/apps/js/standalone_main.cc View 1 chunk +55 lines, -0 lines 1 comment Download
M mojo/mojo.gyp View 1 1 chunk +2 lines, -1 line 0 comments Download
M mojo/mojo_apps.gypi View 1 1 chunk +33 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
hansmuller
This is a refactoring of the JS content handler (https://codereview.chromium.org/467263006) to add support for the ...
6 years, 2 months ago (2014-09-29 23:41:03 UTC) #3
Aaron Boodman
LGTM w/ nits Just fix these and land it, you don't need another review from ...
6 years, 2 months ago (2014-10-01 04:25:44 UTC) #4
hansmuller
Thanks for the feedback! https://codereview.chromium.org/608333002/diff/20001/mojo/apps/js/application_delegate_impl.h File mojo/apps/js/application_delegate_impl.h (right): https://codereview.chromium.org/608333002/diff/20001/mojo/apps/js/application_delegate_impl.h#newcode8 mojo/apps/js/application_delegate_impl.h:8: #include "base/files/file_util.h" On 2014/10/01 04:25:44, ...
6 years, 2 months ago (2014-10-01 15:40:12 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/608333002/40001
6 years, 2 months ago (2014-10-01 15:41:31 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/3930) android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/20675) linux_chromium_gn_dbg ...
6 years, 2 months ago (2014-10-01 15:53:08 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/608333002/60001
6 years, 2 months ago (2014-10-01 16:56:46 UTC) #12
Aaron Boodman
https://codereview.chromium.org/608333002/diff/60001/mojo/apps/js/standalone_main.cc File mojo/apps/js/standalone_main.cc (right): https://codereview.chromium.org/608333002/diff/60001/mojo/apps/js/standalone_main.cc#newcode39 mojo/apps/js/standalone_main.cc:39: base::FilePath path(base::FilePath::FromUTF8Unsafe( I forgot to put this in the ...
6 years, 2 months ago (2014-10-01 17:45:52 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:60001) as 64fc709823fd748574514771747563cd48ce808e
6 years, 2 months ago (2014-10-01 18:01:35 UTC) #14
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/06c28d7358731ae3a7788656a7c7468b813a4b3e Cr-Commit-Position: refs/heads/master@{#297675}
6 years, 2 months ago (2014-10-01 18:02:28 UTC) #15
hansmuller
On 2014/10/01 17:45:52, Aaron Boodman wrote: > https://codereview.chromium.org/608333002/diff/60001/mojo/apps/js/standalone_main.cc > File mojo/apps/js/standalone_main.cc (right): > > https://codereview.chromium.org/608333002/diff/60001/mojo/apps/js/standalone_main.cc#newcode39 ...
6 years, 2 months ago (2014-10-01 20:09:17 UTC) #16
hansmuller
6 years, 2 months ago (2014-10-03 00:39:13 UTC) #17
Message was sent while issue was closed.
On 2014/10/01 20:09:17, hansmuller wrote:
> On 2014/10/01 17:45:52, Aaron Boodman wrote:
> >
>
https://codereview.chromium.org/608333002/diff/60001/mojo/apps/js/standalone_...
> > File mojo/apps/js/standalone_main.cc (right):
> > 
> >
>
https://codereview.chromium.org/608333002/diff/60001/mojo/apps/js/standalone_...
> > mojo/apps/js/standalone_main.cc:39: base::FilePath
> > path(base::FilePath::FromUTF8Unsafe(
> > I forgot to put this in the review, but the hardcoded path here is really
> weird,
> > and makes it impossible for anyone to use this other than you.
> > 
> > I realize you need command line support to make this work right. Are you
> working
> > on that, or is someone else?
> > 
> > I think it would be better for now to use base::PathService to find main.js
in
> > the source tree. At least it would work for all developers then.
> 
> Sorry about that. 
> 
> I'm waiting for a review of https://codereview.chromium.org/617943002/, which
> adds support for mojo_shell command line arguments.
> 
> In what I hope is the very short interim, you'd have to hack
standalone_main.cc.
> 
> - Hans

The fix is in: https://codereview.chromium.org/627563002/

Powered by Google App Engine
This is Rietveld 408576698