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

Unified Diff: chrome/browser/resources/vr_shell/vr_shell_ui.js

Issue 2592143002: First cut of JS closure compiler use for VR HTML UI. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/vr_shell/vr_shell_ui.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.js b/chrome/browser/resources/vr_shell/vr_shell_ui.js
index 3c8b7c8213cbb7858663b0615d6b49af7b2cdf66..bcb95ab4cfa333aedf008a1d5f8c99dd9fa1a398 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js
@@ -122,6 +122,9 @@ var vrShellUi = (function() {
class Controls {
constructor(contentQuadId) {
+ this.enabled = false;
+ this.reloadUiEnabled = false;
+
this.buttons = [];
let descriptors = [
['#back', function() {
@@ -167,6 +170,10 @@ var vrShellUi = (function() {
update.setVisible(false);
update.setScale(2.2, 2.2, 1);
update.setTranslation(0, -0.6, 0.3);
+
+ // The closure compiler should barf on this...
+ update.setTranslation(0, -0.6, 'cat');
cjgrant 2016/12/21 17:10:50 This is what I was playing with: - If I make a cal
+
update.setAnchoring(api.XAnchoring.XNONE, api.YAnchoring.YBOTTOM);
scene.updateElement(this.reloadUiButton.uiElementId, update);
}
@@ -198,6 +205,10 @@ var vrShellUi = (function() {
/** @const */ var DISTANCE = 0.7;
/** @const */ var ANGLE_UP = 16.3 * Math.PI / 180.0;
+ this.enabled = false;
+ this.secure = false;
+ this.secureOriginTimer = null;
+
// Permanent WebVR security warning. This warning is shown near the top of
// the field of view.
this.webVrSecureWarning = new DomUiElement('#webvr-not-secure-permanent');
@@ -271,9 +282,11 @@ var vrShellUi = (function() {
constructor(contentQuadId) {
this.domUiElement = new DomUiElement('#omni-container');
this.enabled = false;
+ this.loading = false;
this.level = 0;
this.visibilityTimeout = 0;
this.visibilityTimer = null;
+ this.visibleAfterTransition = false;
this.nativeState = {};
// Initially invisible.
« no previous file with comments | « chrome/browser/resources/vr_shell/compiled_resources2.gyp ('k') | chrome/browser/resources/vr_shell/vr_shell_ui_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698