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

Side by Side Diff: remoting/webapp/crd/js/signal_strategy.js

Issue 855003008: Log signal strategy progress to server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** 10 /**
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 remoting.SignalStrategy.prototype.connect = 52 remoting.SignalStrategy.prototype.connect =
53 function(server, username, authToken) { 53 function(server, username, authToken) {
54 }; 54 };
55 55
56 /** 56 /**
57 * Sends a message. Can be called only in CONNECTED state. 57 * Sends a message. Can be called only in CONNECTED state.
58 * @param {string} message 58 * @param {string} message
59 */ 59 */
60 remoting.SignalStrategy.prototype.sendMessage = function(message) {}; 60 remoting.SignalStrategy.prototype.sendMessage = function(message) {};
61 61
62 /**
63 * Send any messages accumulated during connection set-up.
64 *
65 * @param {remoting.LogToServer} logToServer The LogToServer instance for the
66 * connection.
67 */
68 remoting.SignalStrategy.prototype.sendConnectionSetupResults =
69 function(logToServer) {
70 };
71
62 /** @return {remoting.SignalStrategy.State} Current state */ 72 /** @return {remoting.SignalStrategy.State} Current state */
63 remoting.SignalStrategy.prototype.getState = function() {}; 73 remoting.SignalStrategy.prototype.getState = function() {};
64 74
65 /** @return {remoting.Error} Error when in FAILED state. */ 75 /** @return {remoting.Error} Error when in FAILED state. */
66 remoting.SignalStrategy.prototype.getError = function() {}; 76 remoting.SignalStrategy.prototype.getError = function() {};
67 77
68 /** @return {string} Current JID when in CONNECTED state. */ 78 /** @return {string} Current JID when in CONNECTED state. */
69 remoting.SignalStrategy.prototype.getJid = function() {}; 79 remoting.SignalStrategy.prototype.getJid = function() {};
70 80
71 /** 81 /**
(...skipping 13 matching lines...) Expand all
85 return new remoting.XmppConnection(onStateChanged); 95 return new remoting.XmppConnection(onStateChanged);
86 }; 96 };
87 97
88 /** 98 /**
89 * @param {function(remoting.SignalStrategy.State): void} onStateChanged 99 * @param {function(remoting.SignalStrategy.State): void} onStateChanged
90 */ 100 */
91 var wcsFactory = function(onStateChanged) { 101 var wcsFactory = function(onStateChanged) {
92 return new remoting.WcsAdapter(onStateChanged); 102 return new remoting.WcsAdapter(onStateChanged);
93 }; 103 };
94 104
95 /**
96 * @param {remoting.FallbackSignalStrategy.Progress} progress
97 */
98 var progressCallback = function(progress) {
99 console.log('FallbackSignalStrategy progress: ' + progress);
100 };
101
102 return new remoting.FallbackSignalStrategy( 105 return new remoting.FallbackSignalStrategy(
103 xmppFactory, wcsFactory, onStateChangedCallback, progressCallback); 106 xmppFactory, wcsFactory, onStateChangedCallback);
104 107
105 } else { 108 } else {
106 return new remoting.WcsAdapter(onStateChangedCallback); 109 return new remoting.WcsAdapter(onStateChangedCallback);
107 } 110 }
108 }; 111 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698