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

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

Issue 2775003002: Assign names to VR UI elements for debugging and test. (Closed)
Patch Set: Created 3 years, 9 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 api = {}; 5 var api = {};
6 6
7 /** 7 /**
8 * Enumeration of scene update commands. 8 * Enumeration of scene update commands.
9 * @enum {number} 9 * @enum {number}
10 * @const 10 * @const
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 /** 208 /**
209 * Set the id of the element to update. 209 * Set the id of the element to update.
210 * @param {number} id 210 * @param {number} id
211 */ 211 */
212 setId(id) { 212 setId(id) {
213 this.properties['id'] = id; 213 this.properties['id'] = id;
214 } 214 }
215 215
216 /** 216 /**
217 * Set the name of the element. This name is used for debug and testing.
218 * @param {string} name
219 */
220 setName(name) {
221 this.properties['name'] = name;
222 }
223
224 /**
217 * Specify a parent for this element. If set, this element is positioned 225 * Specify a parent for this element. If set, this element is positioned
218 * relative to its parent element, rather than absolutely. This allows 226 * relative to its parent element, rather than absolutely. This allows
219 * elements to automatically move with a parent. 227 * elements to automatically move with a parent.
220 * @param {number} id 228 * @param {number} id
221 */ 229 */
222 setParentId(id) { 230 setParentId(id) {
223 this.properties['parentId'] = id; 231 this.properties['parentId'] = id;
224 } 232 }
225 233
226 /** 234 /**
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 if ('removeTab' in dict) { 760 if ('removeTab' in dict) {
753 this.onRemoveTab(dict['removeTab']); 761 this.onRemoveTab(dict['removeTab']);
754 } 762 }
755 if ('canGoBack' in dict) { 763 if ('canGoBack' in dict) {
756 this.onSetHistoryButtonsEnabled(dict['canGoBack'], dict['canGoForward']); 764 this.onSetHistoryButtonsEnabled(dict['canGoBack'], dict['canGoForward']);
757 } 765 }
758 766
759 this.onCommandHandlerFinished() 767 this.onCommandHandlerFinished()
760 } 768 }
761 }; 769 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698