summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 00:39:39 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 00:39:39 +0000
commit461c35d902d7ef0000633cdd7b50422e056ade22 (patch)
tree138b5afa88e1280564cd727e7a5f29e6c725a487 /remoting
parent0dbef8169d3b579925e746e23518cdbd7599a04f (diff)
downloadchromium_src-461c35d902d7ef0000633cdd7b50422e056ade22.zip
chromium_src-461c35d902d7ef0000633cdd7b50422e056ade22.tar.gz
chromium_src-461c35d902d7ef0000633cdd7b50422e056ade22.tar.bz2
Remove before-unload prompt from Me2Me client mode.
BUG=158407 Review URL: https://chromiumcodereview.appspot.com/11336003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/remoting.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
index 93390c3..ed20420 100644
--- a/remoting/webapp/remoting.js
+++ b/remoting/webapp/remoting.js
@@ -161,19 +161,23 @@ remoting.logExtensionInfoAsync_ = function() {
};
/**
- * If the client is connected, or the host is shared, prompt before closing.
+ * If an It2Me client or host is active then prompt the user before closing.
+ * If a Me2Me client is active then don't bother, since closing the window is
+ * the more intuitive way to end a Me2Me session, and re-connecting is easy.
*
* @return {?string} The prompt string if a connection is active.
*/
remoting.promptClose = function() {
+ if (remoting.currentConnectionType == remoting.ConnectionType.Me2Me) {
+ return null;
+ }
switch (remoting.currentMode) {
case remoting.AppMode.CLIENT_CONNECTING:
case remoting.AppMode.HOST_WAITING_FOR_CODE:
case remoting.AppMode.HOST_WAITING_FOR_CONNECTION:
case remoting.AppMode.HOST_SHARED:
case remoting.AppMode.IN_SESSION:
- var result = chrome.i18n.getMessage(/*i18n-content*/'CLOSE_PROMPT');
- return result;
+ return chrome.i18n.getMessage(/*i18n-content*/'CLOSE_PROMPT');
default:
return null;
}