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

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

Issue 2437823002: Control visibility of 2D VR menu buttons using native state. (Closed)
Patch Set: 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 api = (function() { 5 var api = (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Enumeration of scene update commands. 9 * Enumeration of scene update commands.
10 * @enum {number} 10 * @enum {number}
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 */ 67 */
68 var Action = Object.freeze({ 68 var Action = Object.freeze({
69 'HISTORY_BACK': 0, 69 'HISTORY_BACK': 0,
70 'HISTORY_FORWARD': 1, 70 'HISTORY_FORWARD': 1,
71 'RELOAD': 2, 71 'RELOAD': 2,
72 'ZOOM_OUT': 3, 72 'ZOOM_OUT': 3,
73 'ZOOM_IN': 4, 73 'ZOOM_IN': 4,
74 }); 74 });
75 75
76 /** 76 /**
77 * Enumeration of modes that can be specified by the native side.
78 * @enum {number}
79 * @const
80 */
81 var Mode = Object.freeze({
82 'STANDARD': 0,
83 'WEB_VR': 1
84 });
85
86 /**
77 * Triggers an Action. 87 * Triggers an Action.
78 */ 88 */
79 function doAction(action) { 89 function doAction(action) {
80 chrome.send('doAction', [action]); 90 chrome.send('doAction', [action]);
81 } 91 }
82 92
83 /** 93 /**
84 * Notify native scene management that DOM loading has completed, at the 94 * Notify native scene management that DOM loading has completed, at the
85 * specified page size. 95 * specified page size.
86 */ 96 */
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 }; 271 };
262 272
263 return { 273 return {
264 sendCommands: sendCommands, 274 sendCommands: sendCommands,
265 XAnchoring: XAnchoring, 275 XAnchoring: XAnchoring,
266 YAnchoring: YAnchoring, 276 YAnchoring: YAnchoring,
267 Property: Property, 277 Property: Property,
268 Easing: Easing, 278 Easing: Easing,
269 Command: Command, 279 Command: Command,
270 Action: Action, 280 Action: Action,
281 Mode: Mode,
271 getContentElementId: getContentElementId, 282 getContentElementId: getContentElementId,
272 UiElement: UiElement, 283 UiElement: UiElement,
273 UiElementUpdate: UiElementUpdate, 284 UiElementUpdate: UiElementUpdate,
274 Animation: Animation, 285 Animation: Animation,
275 doAction: doAction, 286 doAction: doAction,
276 domLoaded: domLoaded, 287 domLoaded: domLoaded,
277 }; 288 };
278 })(); 289 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698