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

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: Address nits. 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
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 /** 63 /**
64 * Enumeration of actions that can be triggered by the HTML UI. 64 * Enumeration of actions that can be triggered by the HTML UI.
65 * @enum {number} 65 * @enum {number}
66 * @const 66 * @const
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 'UNKNOWN': -1,
83 'STANDARD': 0,
84 'WEB_VR': 1
85 });
86
87 /**
77 * Triggers an Action. 88 * Triggers an Action.
78 */ 89 */
79 function doAction(action) { 90 function doAction(action) {
80 chrome.send('doAction', [action]); 91 chrome.send('doAction', [action]);
81 } 92 }
82 93
83 /** 94 /**
84 * Notify native scene management that DOM loading has completed, at the 95 * Notify native scene management that DOM loading has completed, at the
85 * specified page size. 96 * specified page size.
86 */ 97 */
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 }; 272 };
262 273
263 return { 274 return {
264 sendCommands: sendCommands, 275 sendCommands: sendCommands,
265 XAnchoring: XAnchoring, 276 XAnchoring: XAnchoring,
266 YAnchoring: YAnchoring, 277 YAnchoring: YAnchoring,
267 Property: Property, 278 Property: Property,
268 Easing: Easing, 279 Easing: Easing,
269 Command: Command, 280 Command: Command,
270 Action: Action, 281 Action: Action,
282 Mode: Mode,
271 getContentElementId: getContentElementId, 283 getContentElementId: getContentElementId,
272 UiElement: UiElement, 284 UiElement: UiElement,
273 UiElementUpdate: UiElementUpdate, 285 UiElementUpdate: UiElementUpdate,
274 Animation: Animation, 286 Animation: Animation,
275 doAction: doAction, 287 doAction: doAction,
276 domLoaded: domLoaded, 288 domLoaded: domLoaded,
277 }; 289 };
278 })(); 290 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698