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

Unified Diff: remoting/webapp/me2mom/remoting.js

Issue 8758001: Launch Me2Me connections in a new tab. Remove OK button from post-connect screens for Me2Me. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/me2mom/remoting.js
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index 8dead6e44c7a901e9d2986e6dcc7ddd723bdf34a..b96da60a134de8b39eef8c2deaf657ad3d85cf8a 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -47,6 +47,21 @@ remoting.init = function() {
document.getElementById('current-email').innerText = email;
}
+ window.addEventListener('blur', pluginLostFocus_, false);
+
+ // Parse URL parameters.
+ var urlParams = getUrlParameters();
+ if ('mode' in urlParams) {
+ if (urlParams['mode'] == 'me2me') {
+ var hostJid = urlParams['hostJid'];
+ var hostPublicKey = urlParams['hostPublicKey'];
+ var hostName = urlParams['hostName'];
+ remoting.connectHost(hostJid, hostPublicKey, hostName);
+ return;
+ }
+ }
+
+ // No valid URL parameters, start up normally.
remoting.setMode(getAppStartupMode_());
if (isHostModeSupported_()) {
var noShare = document.getElementById('chrome-os-no-share');
@@ -55,8 +70,6 @@ remoting.init = function() {
var button = document.getElementById('share-button');
button.disabled = true;
}
-
- window.addEventListener('blur', pluginLostFocus_, false);
}
remoting.cancelPendingOperation = function() {

Powered by Google App Engine
This is Rietveld 408576698