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

Unified Diff: remoting/webapp/crd/js/crd_connect.js

Issue 984793003: [Webapp Refactor] Remove It2Me connection code from SessionConnectorImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for Checkin Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/it2me_connect_flow.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/crd_connect.js
diff --git a/remoting/webapp/crd/js/crd_connect.js b/remoting/webapp/crd/js/crd_connect.js
index ea4f7a83f1315de22ee7429707daadcac9149fc7..e02d2d3063d4505da1ac67189d23c6fa0b4bf6a3 100644
--- a/remoting/webapp/crd/js/crd_connect.js
+++ b/remoting/webapp/crd/js/crd_connect.js
@@ -19,7 +19,12 @@ remoting.connectIT2Me = function() {
var connector = remoting.app.getSessionConnector();
var accessCode = document.getElementById('access-code-entry').value;
remoting.setMode(remoting.AppMode.CLIENT_CONNECTING);
- connector.connectIT2Me(accessCode);
+ remoting.It2MeConnectFlow.start(connector, accessCode).
+ catch(function(reason){
+ var errorDiv = document.getElementById('connect-error-message');
+ l10n.localizeElementFromTag(errorDiv, /** @type {string} */ (reason));
+ remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME);
+ });
};
/**
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/it2me_connect_flow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698