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

Issue 2592143002: First cut of JS closure compiler use for VR HTML UI. (Closed)

Created:
4 years ago by cjgrant
Modified:
3 years, 11 months ago
Reviewers:
bshe, amp, Dan Beam
CC:
chromium-reviews, vitalyp+closure_chromium.org, feature-vr-reviews_chromium.org, arv+watch_chromium.org, jlklein+watch-closure_chromium.org, dbeam+watch-closure_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

First cut of JS closure compiler use for VR HTML UI. Also, run clang-format to fix up styling. BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/0cc9f99274349ffcf91788c58dfc0b3297bcd07a Cr-Commit-Position: refs/heads/master@{#441437}

Patch Set 1 #

Total comments: 1

Patch Set 2 : API function type checking now works; need to ensure this new approach is okay. #

Patch Set 3 : Remove test file. #

Total comments: 9

Patch Set 4 : Cleanup and more coverage. #

Patch Set 5 : Relearn the alphabet. #

Patch Set 6 : More cleanup... #

Total comments: 10

Patch Set 7 : Run clang-format so that dbeam@ doesn't have to fix our files; remove the third-party change to exp… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+513 lines, -426 lines) Patch
A chrome/browser/resources/vr_shell/compiled_resources2.gyp View 1 1 chunk +29 lines, -0 lines 0 comments Download
M chrome/browser/resources/vr_shell/vr_shell_ui.js View 1 2 3 4 5 6 9 chunks +44 lines, -27 lines 0 comments Download
M chrome/browser/resources/vr_shell/vr_shell_ui_api.js View 1 2 3 4 5 6 1 chunk +308 lines, -264 lines 0 comments Download
M chrome/browser/resources/vr_shell/vr_shell_ui_scene.js View 1 2 3 4 5 6 1 chunk +132 lines, -135 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
cjgrant
The compiler can be run via: third_party/closure_compiler/run_compiler vr_shell_ui
4 years ago (2016-12-21 17:08:59 UTC) #3
cjgrant
https://codereview.chromium.org/2592143002/diff/1/chrome/browser/resources/vr_shell/vr_shell_ui.js File chrome/browser/resources/vr_shell/vr_shell_ui.js (right): https://codereview.chromium.org/2592143002/diff/1/chrome/browser/resources/vr_shell/vr_shell_ui.js#newcode175 chrome/browser/resources/vr_shell/vr_shell_ui.js:175: update.setTranslation(0, -0.6, 'cat'); This is what I was playing ...
4 years ago (2016-12-21 17:10:51 UTC) #4
cjgrant
On 2016/12/21 17:10:51, cjgrant wrote: > https://codereview.chromium.org/2592143002/diff/1/chrome/browser/resources/vr_shell/vr_shell_ui.js > File chrome/browser/resources/vr_shell/vr_shell_ui.js (right): > > https://codereview.chromium.org/2592143002/diff/1/chrome/browser/resources/vr_shell/vr_shell_ui.js#newcode175 > ...
4 years ago (2016-12-21 20:06:12 UTC) #5
cjgrant
4 years ago (2016-12-21 20:06:25 UTC) #7
amp
This is a great improvement for our javascript! There are more small things that could ...
4 years ago (2016-12-21 20:58:58 UTC) #8
Dan Beam
https://codereview.chromium.org/2592143002/diff/40001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js File chrome/browser/resources/vr_shell/vr_shell_ui_api.js (right): https://codereview.chromium.org/2592143002/diff/40001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js#newcode24 chrome/browser/resources/vr_shell/vr_shell_ui_api.js:24: * @param {Array} commands On 2016/12/21 20:58:58, amp wrote: ...
4 years ago (2016-12-22 00:18:22 UTC) #9
cjgrant
Thanks guys! https://codereview.chromium.org/2592143002/diff/40001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js File chrome/browser/resources/vr_shell/vr_shell_ui_api.js (right): https://codereview.chromium.org/2592143002/diff/40001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js#newcode24 chrome/browser/resources/vr_shell/vr_shell_ui_api.js:24: * @param {Array} commands On 2016/12/22 00:18:21, ...
4 years ago (2016-12-22 18:15:46 UTC) #10
cjgrant
Folks, here's more of the first cut. There is definitely a LOT more than can ...
4 years ago (2016-12-22 20:34:33 UTC) #11
amp
LGTM as a starting point. We can have further changes to the UI update the ...
4 years ago (2016-12-22 21:10:43 UTC) #12
bshe
On 2016/12/22 21:10:43, amp wrote: > LGTM as a starting point. We can have further ...
3 years, 11 months ago (2017-01-03 16:00:54 UTC) #13
cjgrant
dbeam@chromium.org: Please review changes in the third-party closure compiler inclusion. This change is an incremental ...
3 years, 11 months ago (2017-01-03 16:54:25 UTC) #15
cjgrant
https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js File chrome/browser/resources/vr_shell/vr_shell_ui_api.js (right): https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js#newcode82 chrome/browser/resources/vr_shell/vr_shell_ui_api.js:82: * @param {api.Action} action On 2016/12/22 21:10:43, amp wrote: ...
3 years, 11 months ago (2017-01-03 17:05:39 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2592143002/120001
3 years, 11 months ago (2017-01-04 18:24:36 UTC) #20
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/689de0633e3cdb19768688e7afb6f1caa3f16357
3 years, 11 months ago (2017-01-04 19:33:11 UTC) #23
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/0cc9f99274349ffcf91788c58dfc0b3297bcd07a Cr-Commit-Position: refs/heads/master@{#441437}
3 years, 11 months ago (2017-01-04 19:36:25 UTC) #25
Dan Beam
https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js File chrome/browser/resources/vr_shell/vr_shell_ui_api.js (right): https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resources/vr_shell/vr_shell_ui_api.js#newcode5 chrome/browser/resources/vr_shell/vr_shell_ui_api.js:5: var api = new Object(); var api = {}; ...
3 years, 11 months ago (2017-01-04 20:29:02 UTC) #26
cjgrant
3 years, 11 months ago (2017-01-04 21:23:17 UTC) #27
Message was sent while issue was closed.
https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resourc...
File chrome/browser/resources/vr_shell/vr_shell_ui_api.js (right):

https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resourc...
chrome/browser/resources/vr_shell/vr_shell_ui_api.js:5: var api = new Object();
On 2017/01/04 20:29:02, Dan Beam wrote:
> var api = {};
> 
> OR
> 
> cr.exportPath('api');
> 
> OR
> 
> cr.define('api', function() {
>   // ... magic happens for @enum as long as you return at the bottom
>   // because of our fancy compiler pass ...
>   /** @enum {number} */
>   var Command = {...};
>   return {Command: Command};
> });

We previously used your Option 3, but ditched it as I have having trouble
getting the compiler to follow it.  Option 1 looks sufficient.

https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resourc...
chrome/browser/resources/vr_shell/vr_shell_ui_api.js:17: 'REMOVE_ANIMATION': 4
On 2017/01/04 20:29:01, Dan Beam wrote:
> indent off
> 
> protip: tools/clang-format-js

See the next patch set - I've been watching your clang-format goodness
unfolding, and applied it before submitting. :)

https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resourc...
File chrome/browser/resources/vr_shell/vr_shell_ui_scene.js (right):

https://codereview.chromium.org/2592143002/diff/100001/chrome/browser/resourc...
chrome/browser/resources/vr_shell/vr_shell_ui_scene.js:5: var ui = new Object();
On 2017/01/04 20:29:02, Dan Beam wrote:
> don't invoke Object, just use {}

Thanks; I'll fix that in a follow-on change.

Powered by Google App Engine
This is Rietveld 408576698