Chromium Code Reviews| Index: remoting/webapp/crd/js/signal_strategy.js |
| diff --git a/remoting/webapp/crd/js/signal_strategy.js b/remoting/webapp/crd/js/signal_strategy.js |
| index f07613f9bd3a71175197341e38896592fce4788f..8d1f57830b6cf32a172ea7204648a3898aab6cbf 100644 |
| --- a/remoting/webapp/crd/js/signal_strategy.js |
| +++ b/remoting/webapp/crd/js/signal_strategy.js |
| @@ -35,6 +35,15 @@ remoting.SignalStrategy.State = { |
| CLOSED: 5 |
| }; |
| +/** |
| + * @enum {string} SignalStrategy types. Do not add to these values without |
| + * updating the corresponding enum in chromoting_extensions.proto. |
| + */ |
| +remoting.SignalStrategy.Type = { |
| + XMPP: 'xmpp', |
| + WCS: 'wcs' |
| +}; |
| + |
| remoting.SignalStrategy.prototype.dispose = function() {}; |
| /** |
| @@ -59,6 +68,16 @@ remoting.SignalStrategy.prototype.connect = |
| */ |
| remoting.SignalStrategy.prototype.sendMessage = function(message) {}; |
| +/** |
| + * Send any messages accumulated during connection set-up. |
| + * |
| + * @param {remoting.LogToServer} logToServer The LogToServer instance for the |
| + * connection. |
| + */ |
| +remoting.SignalStrategy.prototype.sendConnectionSetupResults = |
| + function(logToServer) { |
| +}; |
| + |
| /** @return {remoting.SignalStrategy.State} Current state */ |
| remoting.SignalStrategy.prototype.getState = function() {}; |
| @@ -68,6 +87,9 @@ remoting.SignalStrategy.prototype.getError = function() {}; |
| /** @return {string} Current JID when in CONNECTED state. */ |
| remoting.SignalStrategy.prototype.getJid = function() {}; |
| +/** @return {remoting.SignalStrategy.Type} The signal strategy type. */ |
| +remoting.SignalStrategy.prototype.getType = function() {}; |
|
Jamie
2015/01/21 19:41:08
I'm not crazy about this design, since it means th
|
| + |
| /** |
| * Creates the appropriate signal strategy for the current environment. |
| * @param {function(remoting.SignalStrategy.State): void} onStateChangedCallback |
| @@ -92,15 +114,8 @@ remoting.SignalStrategy.create = function(onStateChangedCallback) { |
| return new remoting.WcsAdapter(onStateChanged); |
| }; |
| - /** |
| - * @param {remoting.FallbackSignalStrategy.Progress} progress |
| - */ |
| - var progressCallback = function(progress) { |
| - console.log('FallbackSignalStrategy progress: ' + progress); |
| - }; |
| - |
| return new remoting.FallbackSignalStrategy( |
| - xmppFactory, wcsFactory, onStateChangedCallback, progressCallback); |
| + xmppFactory, wcsFactory, onStateChangedCallback); |
| } else { |
| return new remoting.WcsAdapter(onStateChangedCallback); |