| Index: remoting/webapp/crd/js/host_list_api_impl.js
|
| diff --git a/remoting/webapp/crd/js/host_list_api.js b/remoting/webapp/crd/js/host_list_api_impl.js
|
| similarity index 88%
|
| copy from remoting/webapp/crd/js/host_list_api.js
|
| copy to remoting/webapp/crd/js/host_list_api_impl.js
|
| index c9bb2cf22a3ad03a0b72b6c98a0eb6e231d57c22..35babb0124213158712d25b0b0cf350b5966c6f8 100644
|
| --- a/remoting/webapp/crd/js/host_list_api.js
|
| +++ b/remoting/webapp/crd/js/host_list_api_impl.js
|
| @@ -12,8 +12,11 @@
|
| /** @suppress {duplicate} */
|
| var remoting = remoting || {};
|
|
|
| -/** @constructor */
|
| -remoting.HostListApi = function() {
|
| +/**
|
| + * @constructor
|
| + * @implements {remoting.HostListApi}
|
| + */
|
| +remoting.HostListApiImpl = function() {
|
| };
|
|
|
| /**
|
| @@ -22,7 +25,7 @@ remoting.HostListApi = function() {
|
| * @param {function(Array.<remoting.Host>):void} onDone
|
| * @param {function(remoting.Error):void} onError
|
| */
|
| -remoting.HostListApi.prototype.get = function(onDone, onError) {
|
| +remoting.HostListApiImpl.prototype.get = function(onDone, onError) {
|
| /** @type {function(XMLHttpRequest):void} */
|
| var parseHostListResponse =
|
| this.parseHostListResponse_.bind(this, onDone, onError)
|
| @@ -44,7 +47,7 @@ remoting.HostListApi.prototype.get = function(onDone, onError) {
|
| * @param {string} hostName
|
| * @param {string} hostPublicKey
|
| */
|
| -remoting.HostListApi.prototype.put =
|
| +remoting.HostListApiImpl.prototype.put =
|
| function(hostId, hostName, hostPublicKey, onDone, onError) {
|
| /** @param {string} token */
|
| var onToken = function(token) {
|
| @@ -75,7 +78,7 @@ remoting.HostListApi.prototype.put =
|
| * @param {function(remoting.Error):void} onError
|
| * @param {string} hostId
|
| */
|
| -remoting.HostListApi.prototype.remove = function(hostId, onDone, onError) {
|
| +remoting.HostListApiImpl.prototype.remove = function(hostId, onDone, onError) {
|
| /** @param {string} token */
|
| var onToken = function(token) {
|
| var headers = { 'Authorization': 'OAuth ' + token };
|
| @@ -97,7 +100,7 @@ remoting.HostListApi.prototype.remove = function(hostId, onDone, onError) {
|
| * @param {XMLHttpRequest} xhr
|
| * @private
|
| */
|
| -remoting.HostListApi.prototype.parseHostListResponse_ =
|
| +remoting.HostListApiImpl.prototype.parseHostListResponse_ =
|
| function(onDone, onError, xhr) {
|
| if (xhr.status == 200) {
|
| var response = /** @type {{data: {items: Array}}} */
|
| @@ -115,4 +118,4 @@ remoting.HostListApi.prototype.parseHostListResponse_ =
|
| };
|
|
|
| /** @type {remoting.HostListApi} */
|
| -remoting.hostListApi = new remoting.HostListApi();
|
| +remoting.hostListApi = new remoting.HostListApiImpl();
|
|
|