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

Unified Diff: remoting/webapp/hangout_session.js

Issue 468693002: Hangouts remote desktop part III - It2MeService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/hangout_session.js
diff --git a/remoting/webapp/hangout_session.js b/remoting/webapp/hangout_session.js
index 58c1804dad02325cca16e2acfa233436ad38295a..bfcda8687b16c615a22b9ee4e2a35d69b1e53639 100644
--- a/remoting/webapp/hangout_session.js
+++ b/remoting/webapp/hangout_session.js
@@ -17,17 +17,25 @@ var remoting = remoting || {};
/**
* @constructor
+ * @param {string} senderId id of the current tab or window.
*/
-remoting.HangoutSession = function() {
+remoting.HangoutSession = function(senderId) {
/**
* @private
* @type {chrome.runtime.Port}
*/
this.port_ = null;
+
+ /**
+ * @private
+ * @type {string}
+ */
+ this.senderId_ = senderId;
};
remoting.HangoutSession.prototype.init = function() {
- this.port_ = chrome.runtime.connect({name: 'it2me.helper.webapp'});
+ var portName = 'it2me.helper.webapp@' + this.senderId_;
+ this.port_ = chrome.runtime.connect({name: portName});
remoting.hangoutSessionEvents.addEventListener(
remoting.hangoutSessionEvents.sessionStateChanged,
@@ -44,6 +52,8 @@ remoting.HangoutSession.prototype.onSessionStateChanged_ = function(state) {
} catch (e) {
// postMessage will throw an exception if the port is disconnected.
// We can safely ignore this exception.
+ var error = /** @type {Error} */ e;
+ console.error(error);
} finally {
if (state === State.FAILED || state === State.CLOSED) {
// close the current window

Powered by Google App Engine
This is Rietveld 408576698