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

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

Issue 2867223003: Send a message to the client if bad It2Me policies are read. (Closed)
Patch Set: Fix race. Created 3 years, 7 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/host_session.js ('k') | no next file » | 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class to communicate with the It2me Host component via Native Messaging. 7 * Class to communicate with the It2me Host component via Native Messaging.
8 */ 8 */
9 9
10 /** @suppress {duplicate} */ 10 /** @suppress {duplicate} */
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 break; 280 break;
281 281
282 case 'natPolicyChanged': 282 case 'natPolicyChanged':
283 if (this.onNatPolicyChanged_) { 283 if (this.onNatPolicyChanged_) {
284 var natTraversalEnabled = 284 var natTraversalEnabled =
285 base.getBooleanAttr(message, 'natTraversalEnabled'); 285 base.getBooleanAttr(message, 'natTraversalEnabled');
286 this.onNatPolicyChanged_(natTraversalEnabled); 286 this.onNatPolicyChanged_(natTraversalEnabled);
287 } 287 }
288 break; 288 break;
289 289
290 case 'policyError':
291 if (this.onError_) {
292 this.onError_(new remoting.Error(remoting.Error.Tag.POLICY_ERROR));
293 }
294 break;
295
290 case 'error': 296 case 'error':
291 console.error(base.getStringAttr(message, 'description')); 297 console.error(base.getStringAttr(message, 'description'));
292 if (this.onError_) { 298 if (this.onError_) {
293 this.onError_(remoting.Error.unexpected()); 299 this.onError_(remoting.Error.unexpected());
294 } 300 }
295 break; 301 break;
296 302
297 default: 303 default:
298 throw 'Unexpected native message: ' + message; 304 throw 'Unexpected native message: ' + message;
299 } 305 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 chrome.runtime.lastError.message); 342 chrome.runtime.lastError.message);
337 this.onInitializationFailed_(); 343 this.onInitializationFailed_();
338 } else { 344 } else {
339 console.error('Native Messaging port disconnected.'); 345 console.error('Native Messaging port disconnected.');
340 this.port_ = null; 346 this.port_ = null;
341 this.onError_(remoting.Error.unexpected()); 347 this.onError_(remoting.Error.unexpected());
342 } 348 }
343 }; 349 };
344 350
345 })(); 351 })();
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/host_session.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698