| OLD | NEW |
| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 /** | 134 /** |
| 135 * @param {boolean} response True if the feature is present. | 135 * @param {boolean} response True if the feature is present. |
| 136 */ | 136 */ |
| 137 var onHasFeatureResponse = function(response) { | 137 var onHasFeatureResponse = function(response) { |
| 138 /** | 138 /** |
| 139 * @param {!remoting.Error} error | 139 * @param {!remoting.Error} error |
| 140 */ | 140 */ |
| 141 var onError = function(error) { | 141 var onError = function(error) { |
| 142 console.error('Failed to get pairing status: ' + error); | 142 console.error('Failed to get pairing status: ' + error.toString()); |
| 143 remoting.pairedClientManager.setPairedClients([]); | 143 remoting.pairedClientManager.setPairedClients([]); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 if (response) { | 146 if (response) { |
| 147 remoting.hostController.getPairedClients( | 147 remoting.hostController.getPairedClients( |
| 148 remoting.pairedClientManager.setPairedClients.bind( | 148 remoting.pairedClientManager.setPairedClients.bind( |
| 149 remoting.pairedClientManager), | 149 remoting.pairedClientManager), |
| 150 onError); | 150 onError); |
| 151 } else { | 151 } else { |
| 152 console.log('Pairing registry not supported by host.'); | 152 console.log('Pairing registry not supported by host.'); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 181 } | 181 } |
| 182 | 182 |
| 183 | 183 |
| 184 remoting.startDesktopRemoting = function() { | 184 remoting.startDesktopRemoting = function() { |
| 185 remoting.app = new remoting.Application(remoting.app_capabilities()); | 185 remoting.app = new remoting.Application(remoting.app_capabilities()); |
| 186 var desktop_remoting = new remoting.DesktopRemoting(remoting.app); | 186 var desktop_remoting = new remoting.DesktopRemoting(remoting.app); |
| 187 remoting.app.start(); | 187 remoting.app.start(); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 window.addEventListener('load', remoting.startDesktopRemotingForTesting, false); | 190 window.addEventListener('load', remoting.startDesktopRemotingForTesting, false); |
| OLD | NEW |