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

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

Issue 1285213006: Send connection setup results using XHRs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 27 matching lines...) Expand all
38 var that = this; 38 var that = this;
39 Promise.resolve().then(function() { 39 Promise.resolve().then(function() {
40 that.setStateForTesting(remoting.SignalStrategy.State.CONNECTED); 40 that.setStateForTesting(remoting.SignalStrategy.State.CONNECTED);
41 }); 41 });
42 }; 42 };
43 43
44 /** @override */ 44 /** @override */
45 remoting.MockSignalStrategy.prototype.sendMessage = function() { 45 remoting.MockSignalStrategy.prototype.sendMessage = function() {
46 }; 46 };
47 47
48 /** @override */
49 remoting.MockSignalStrategy.prototype.sendConnectionSetupResults = function() {
50 };
51
52 /** 48 /**
53 * @param {function(remoting.SignalStrategy.State):void} onStateChangedCallback 49 * @param {function(remoting.SignalStrategy.State):void} onStateChangedCallback
54 * Callback to call on state change. 50 * Callback to call on state change.
55 */ 51 */
56 remoting.MockSignalStrategy.prototype.setStateChangedCallback = function( 52 remoting.MockSignalStrategy.prototype.setStateChangedCallback = function(
57 onStateChangedCallback) { 53 onStateChangedCallback) {
58 this.onStateChangedCallback_ = onStateChangedCallback; 54 this.onStateChangedCallback_ = onStateChangedCallback;
59 }; 55 };
60 56
61 /** 57 /**
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 */ 95 */
100 remoting.MockSignalStrategy.prototype.setStateForTesting = function(state) { 96 remoting.MockSignalStrategy.prototype.setStateForTesting = function(state) {
101 this.state_ = state; 97 this.state_ = state;
102 if (state == remoting.SignalStrategy.State.FAILED) { 98 if (state == remoting.SignalStrategy.State.FAILED) {
103 this.error_ = remoting.Error.unexpected('setStateForTesting'); 99 this.error_ = remoting.Error.unexpected('setStateForTesting');
104 } else { 100 } else {
105 this.error_ = remoting.Error.none(); 101 this.error_ = remoting.Error.none();
106 } 102 }
107 this.onStateChangedCallback_(state); 103 this.onStateChangedCallback_(state);
108 }; 104 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698