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

Side by Side Diff: chrome/browser/resources/vr_shell/vr_shell_ui.js

Issue 2434013002: Implement a means of letting native VR Shell control the HTML UI. (Closed)
Patch Set: Impelement a means of letting native VR Shell control the HTML UI. Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var vrShellUi = (function() { 5 cr.define('chrome.vrShellUi', function() {
bshe 2016/10/19 21:02:40 now that you have cr.js, perhaps do the same for v
cjgrant 2016/10/20 15:25:39 Why do that if native is calling only to the UI?
bshe 2016/10/20 18:07:48 I don't think it is related to native. I believe c
cjgrant 2016/10/20 19:59:58 As discussed, removed use of cr.define().
6 'use strict'; 6 'use strict';
7 7
8 var scene = new ui.Scene(); 8 var scene = new ui.Scene();
9 var uiElements = []; 9 var uiElements = [];
10 10
11 class DomUiElement { 11 class DomUiElement {
12 constructor(domId) { 12 constructor(domId) {
13 var domElement = document.querySelector(domId); 13 var domElement = document.querySelector(domId);
14 var style = window.getComputedStyle(domElement); 14 var style = window.getComputedStyle(domElement);
15 15
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 scene.updateElement(element.uiElementId, update); 105 scene.updateElement(element.uiElementId, update);
106 } 106 }
107 107
108 scene.flush(); 108 scene.flush();
109 } 109 }
110 110
111 function domLoaded() { 111 function domLoaded() {
112 api.domLoaded(); 112 api.domLoaded();
113 } 113 }
114 114
115 function command(dict) {
mthiesse 2016/10/19 18:04:10 Put in a TODO to implement this?
116 }
117
115 return { 118 return {
116 initialize: initialize, 119 initialize: initialize,
120 command: command,
117 }; 121 };
118 })(); 122 });
119 123
120 document.addEventListener('DOMContentLoaded', vrShellUi.initialize); 124 document.addEventListener('DOMContentLoaded', chrome.vrShellUi.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698