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

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

Issue 2647053002: Add initial VR interactive omnibox. (Closed)
Patch Set: Created 3 years, 11 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 * @const 60 * @const
61 */ 61 */
62 api.Action = { 62 api.Action = {
63 'HISTORY_BACK': 0, 63 'HISTORY_BACK': 0,
64 'HISTORY_FORWARD': 1, 64 'HISTORY_FORWARD': 1,
65 'RELOAD': 2, 65 'RELOAD': 2,
66 'ZOOM_OUT': 3, 66 'ZOOM_OUT': 3,
67 'ZOOM_IN': 4, 67 'ZOOM_IN': 4,
68 'RELOAD_UI': 5, 68 'RELOAD_UI': 5,
69 'KEY_EVENT': 6, 69 'KEY_EVENT': 6,
70 'LOAD_URL': 7,
71 'OMNIBOX_CONTENT': 8,
70 }; 72 };
71 73
72 /** 74 /**
73 * Enumeration of modes that can be specified by the native side. 75 * Enumeration of modes that can be specified by the native side.
74 * @enum {number} 76 * @enum {number}
75 * @const 77 * @const
76 */ 78 */
77 api.Mode = { 79 api.Mode = {
78 'UNKNOWN': -1, 80 'UNKNOWN': -1,
79 'STANDARD': 0, 81 'STANDARD': 0,
80 'WEB_VR': 1, 82 'WEB_VR': 1,
81 }; 83 };
82 84
83 /** 85 /**
84 * Triggers an Action. 86 * Triggers an Action.
85 * @param {api.Action} action 87 * @param {api.Action} action
88 * @param {Object} parameters
86 */ 89 */
87 api.doAction = function(action, args) { 90 api.doAction = function(action, parameters) {
88 chrome.send('doAction', [action, args]); 91 chrome.send('doAction', [action, parameters]);
89 }; 92 };
90 93
91 /** 94 /**
92 * Notify native scene management that DOM loading has completed, at the 95 * Notify native scene management that DOM loading has completed, at the
93 * specified page size. 96 * specified page size.
94 */ 97 */
95 api.domLoaded = function() { 98 api.domLoaded = function() {
96 chrome.send('domLoaded'); 99 chrome.send('domLoaded');
97 }; 100 };
98 101
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 378
376 /** 379 /**
377 * Set the animation's final element opacity. 380 * Set the animation's final element opacity.
378 * @param {number} opacity 381 * @param {number} opacity
379 */ 382 */
380 setOpacity(opacity) { 383 setOpacity(opacity) {
381 this.property = api.Property.OPACITY; 384 this.property = api.Property.OPACITY;
382 this.to.x = opacity; 385 this.to.x = opacity;
383 } 386 }
384 }; 387 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698