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

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

Issue 1020743002: [Chromoting] Move app-specific code out of remoting.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make isMe2MeInstallable private 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/webapp/crd/js/host_list.js ('k') | remoting/webapp/crd/js/local_host_section.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/host_setup_dialog.js
diff --git a/remoting/webapp/crd/js/host_setup_dialog.js b/remoting/webapp/crd/js/host_setup_dialog.js
index 9065b53c4e1ab665722f27d723af6aaf6896c229..40cc7d5c1067c49ec8cb5cb17c814994e96cae35 100644
--- a/remoting/webapp/crd/js/host_setup_dialog.js
+++ b/remoting/webapp/crd/js/host_setup_dialog.js
@@ -93,11 +93,15 @@ remoting.HostSetupFlow.prototype.switchToErrorState = function(error) {
/**
* @param {remoting.HostController} hostController The HostController
- * responsible for the host daemon.
+ * responsible for the host daemon.
+ * @param {function(!remoting.Error)} onError Function to call when an error
+ * occurs.
* @constructor
*/
-remoting.HostSetupDialog = function(hostController) {
+remoting.HostSetupDialog = function(hostController, onError) {
this.hostController_ = hostController;
+ this.onError_ = onError;
+
this.pinEntry_ = document.getElementById('daemon-pin-entry');
this.pinConfirm_ = document.getElementById('daemon-pin-confirm');
this.pinErrorDiv_ = document.getElementById('daemon-pin-error-div');
@@ -165,7 +169,7 @@ remoting.HostSetupDialog.prototype.showForStart = function() {
// case where the refresh token is invalid.
remoting.identity.getToken().then(
that.showForStartWithToken_.bind(that, state),
- remoting.Error.handler(remoting.showErrorMessage));
+ remoting.Error.handler(that.onError_));
};
this.hostController_.getLocalHostState(onState);
« no previous file with comments | « remoting/webapp/crd/js/host_list.js ('k') | remoting/webapp/crd/js/local_host_section.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698