| Index: remoting/webapp/crd/js/it2me_connect_flow.js
|
| diff --git a/remoting/webapp/crd/js/it2me_connect_flow.js b/remoting/webapp/crd/js/it2me_connect_flow.js
|
| index 7ac902c5b9159aacce5bfc324c8865bb73c8906b..cd500079b31c655df28da159e05ffe8856cded41 100644
|
| --- a/remoting/webapp/crd/js/it2me_connect_flow.js
|
| +++ b/remoting/webapp/crd/js/it2me_connect_flow.js
|
| @@ -17,6 +17,7 @@ var ACCESS_CODE_LENGTH = SUPPORT_ID_LENGTH + HOST_SECRET_LENGTH;
|
| /**
|
| * @param {remoting.SessionConnector} sessionConnector
|
| * @constructor
|
| + * @implements {remoting.ConnectFlow}
|
| */
|
| remoting.It2MeConnectFlow = function(sessionConnector) {
|
| /** @private */
|
| @@ -35,6 +36,7 @@ remoting.It2MeConnectFlow = function(sessionConnector) {
|
| form.querySelector('#cancel-access-code-button'));
|
| };
|
|
|
| +remoting.It2MeConnectFlow.prototype.dispose = function() {};
|
|
|
| remoting.It2MeConnectFlow.prototype.start = function() {
|
| var that = this;
|
| @@ -65,6 +67,34 @@ remoting.It2MeConnectFlow.prototype.start = function() {
|
| };
|
|
|
| /**
|
| + * @param {!remoting.Error} error
|
| + */
|
| +remoting.It2MeConnectFlow.prototype.onConnectionFailed = function(error) {
|
| + this.onError(error);
|
| +};
|
| +
|
| +/**
|
| + * @param {!remoting.ConnectionInfo} connectionInfo
|
| + */
|
| +remoting.It2MeConnectFlow.prototype.onConnected = function(connectionInfo) {
|
| + this.accessCodeDialog_.inputField().value = '';
|
| +};
|
| +
|
| +remoting.It2MeConnectFlow.prototype.onDisconnected = function() {
|
| + remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME);
|
| +};
|
| +
|
| +/**
|
| + * @param {!remoting.Error} error
|
| + */
|
| +remoting.It2MeConnectFlow.prototype.onError = function(error) {
|
| + var errorDiv = document.getElementById('connect-error-message');
|
| + l10n.localizeElementFromTag(errorDiv, error.getTag());
|
| + remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME);
|
| +};
|
| +
|
| +
|
| +/**
|
| * @param {string} accessCode
|
| * @return {Promise} Promise that resolves if the access code is valid.
|
| * @private
|
|
|