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

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

Issue 1066283002: [Webapp Refactor] Implements remoting.MessageDialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: remoting/webapp/crd/js/it2me_activity.js
diff --git a/remoting/webapp/crd/js/it2me_activity.js b/remoting/webapp/crd/js/it2me_activity.js
index 144253d5dc06447ea5b7bd94b11617e7952d75ab..e6eac18fc78bc1db131b7a83f29bb31ec4e841bc 100644
--- a/remoting/webapp/crd/js/it2me_activity.js
+++ b/remoting/webapp/crd/js/it2me_activity.js
@@ -81,7 +81,7 @@ remoting.It2MeActivity.prototype.onConnected = function(connectionInfo) {
};
remoting.It2MeActivity.prototype.onDisconnected = function() {
- remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME);
+ this.showFinishDialog_(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME);
};
/**
@@ -90,9 +90,21 @@ remoting.It2MeActivity.prototype.onDisconnected = function() {
remoting.It2MeActivity.prototype.onError = function(error) {
var errorDiv = document.getElementById('connect-error-message');
l10n.localizeElementFromTag(errorDiv, error.getTag());
- remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME);
+ this.showFinishDialog_(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME);
};
+/**
+ * @param {remoting.AppMode} mode
+ * @private
+ */
+remoting.It2MeActivity.prototype.showFinishDialog_ = function(mode) {
+ var finishDialog = new remoting.MessageDialog(
+ mode,
+ document.getElementById('client-finished-it2me-button'));
+ finishDialog.show().then(function() {
+ remoting.setMode(remoting.AppMode.HOME);
+ });
+};
/**
* @param {string} accessCode

Powered by Google App Engine
This is Rietveld 408576698