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

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

Issue 1004513002: Eliminated named constants for instances of remoting.Error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « remoting/webapp/crd/js/crd_connect.js ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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);
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/crd_connect.js ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698