Upstream version 11.39.250.0
[platform/framework/web/crosswalk.git] / src / remoting / webapp / session_connector_impl.js
index 5557387..c9ce6fd 100644 (file)
@@ -361,16 +361,8 @@ remoting.SessionConnectorImpl.prototype.connectSignaling_ = function() {
         remoting.settings.XMPP_SERVER_ADDRESS, email, token);
   }
 
-  // Only use XMPP when TCP API is available and TLS support is enabled. That's
-  // not the case for V1 app (socket API is available only to platform apps)
-  // and for Chrome releases before 38.
-  if (chrome.socket && chrome.socket.secure) {
-    this.signalStrategy_ = /** @type {remoting.SignalStrategy} */
-        (new remoting.XmppConnection(this.onSignalingState_.bind(this)));
-  } else {
-    this.signalStrategy_ = /** @type {remoting.SignalStrategy} */
-        (new remoting.WcsAdapter(this.onSignalingState_.bind(this)));
-  }
+  this.signalStrategy_ =
+      remoting.SignalStrategy.create(this.onSignalingState_.bind(this));
 
   remoting.identity.callWithToken(connectSignalingWithToken, this.onError_);
 };