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

Side by Side Diff: remoting/webapp/crd/js/host_list_api.js

Issue 1111603002: Added ability to register new hosts using GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-list-delete
Patch Set: unit test fix Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * API for host-list management. 7 * API for host-list management.
8 */ 8 */
9 9
10 /** @suppress {duplicate} */ 10 /** @suppress {duplicate} */
11 var remoting = remoting || {}; 11 var remoting = remoting || {};
12 12
13 (function() { 13 (function() {
14 14
15 'use strict'; 15 'use strict';
16 16
17 /** @interface */ 17 /** @interface */
18 remoting.HostListApi = function() { 18 remoting.HostListApi = function() {
19 }; 19 };
20 20
21 /** 21 /**
22 * Registers a new host with the host registry service (either the 22 * Registers a new host with the host registry service (either the
23 * Chromoting registry or GCD). 23 * Chromoting registry or GCD).
24 * 24 *
25 * @param {string} newHostId The ID of the new host to register. 25 * @param {string} newHostId The ID of the new host to register.
26 * @param {string} hostName The user-visible name of the new host. 26 * @param {string} hostName The user-visible name of the new host.
27 * @param {string} publicKey The public half of the host's key pair. 27 * @param {string} publicKey The public half of the host's key pair.
28 * @param {string} hostClientId The OAuth2 client ID of the host. 28 * @param {string} hostClientId The OAuth2 client ID of the host.
29 * @return {!Promise<string>} An OAuth2 auth code or the empty string. 29 * @return {!Promise<remoting.HostListApi.RegisterResult>}
30 */ 30 */
31 remoting.HostListApi.prototype.register = function( 31 remoting.HostListApi.prototype.register = function(
32 newHostId, hostName, publicKey, hostClientId) { 32 newHostId, hostName, publicKey, hostClientId) {
33 }; 33 };
34 34
35 /** 35 /**
36 * Fetch the list of hosts for a user. 36 * Fetch the list of hosts for a user.
37 * 37 *
38 * @return {!Promise<!Array<!remoting.Host>>} 38 * @return {!Promise<!Array<!remoting.Host>>}
39 */ 39 */
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 /** 81 /**
82 * For testing. 82 * For testing.
83 * @param {remoting.HostListApi} newInstance 83 * @param {remoting.HostListApi} newInstance
84 */ 84 */
85 remoting.HostListApi.setInstance = function(newInstance) { 85 remoting.HostListApi.setInstance = function(newInstance) {
86 instance = newInstance; 86 instance = newInstance;
87 }; 87 };
88 88
89 })(); 89 })();
90
91 /**
92 * A pair of an OAuth2 auth code and a robot account email. Depending
93 * on the specifics of the registration process, either could be the
94 * empty string.
95 *
96 * @typedef {{
97 * authCode: string,
98 * email: string
99 * }}
100 */
101 remoting.HostListApi.RegisterResult;
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/host_controller_unittest.js ('k') | remoting/webapp/crd/js/host_list_api_gcd_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698