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

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

Issue 1370283004: [Chromoting] Remote Assistance in Public Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PublicSession
Patch Set: Rebase Created 5 years, 3 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/html/template_public_session.html ('k') | remoting/webapp/crd/js/host_screen.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/activation_handler.js
diff --git a/remoting/webapp/crd/js/activation_handler.js b/remoting/webapp/crd/js/activation_handler.js
index 901dde9f7562545b064557fbd1b249763b31bf8e..cadb882752d60daddcf72ec979a7e86c95e43108 100644
--- a/remoting/webapp/crd/js/activation_handler.js
+++ b/remoting/webapp/crd/js/activation_handler.js
@@ -80,7 +80,7 @@ remoting.ActivationHandler.Ipc = {
*/
remoting.ActivationHandler.prototype.onContextMenu_ = function(info) {
if (info.menuItemId == NEW_WINDOW_MENU_ID_) {
- this.createWindow_();
+ this.launchDefaultSession_();
}
};
@@ -95,10 +95,15 @@ remoting.ActivationHandler.prototype.onRestart_ = function(id) {
};
/**
+ * @param {Event} launchData
* @private
*/
-remoting.ActivationHandler.prototype.onLaunched_ = function() {
- this.createWindow_();
+remoting.ActivationHandler.prototype.onLaunched_ = function(launchData) {
+ if (launchData['isPublicSession']) {
+ this.launchIt2MeSession_();
+ } else {
+ this.launchDefaultSession_();
+ }
};
/**
@@ -106,7 +111,7 @@ remoting.ActivationHandler.prototype.onLaunched_ = function() {
*
* @private
*/
-remoting.ActivationHandler.prototype.createWindow_ = function() {
+remoting.ActivationHandler.prototype.launchDefaultSession_ = function() {
this.appLauncher_.launch().then(this.onWindowCreated_.bind(this));
};
@@ -144,6 +149,15 @@ remoting.ActivationHandler.prototype.onWindowClosed_ = function(id) {
this.raiseEvent(remoting.ActivationHandler.Events.windowClosed, id);
};
+/** @private */
+remoting.ActivationHandler.prototype.launchIt2MeSession_ = function() {
+ chrome.app.window.create("public_session.html", {
+ 'width': 570,
+ 'height': 300,
+ 'resizable': false
+ });
+};
+
})();
/** @enum {string} */
« no previous file with comments | « remoting/webapp/crd/html/template_public_session.html ('k') | remoting/webapp/crd/js/host_screen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698