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

Side by Side Diff: remoting/webapp/host_native_messaging.js

Issue 132793007: Download the host components when user tries to enable Me2Me host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/host_list.js ('k') | remoting/webapp/host_setup_dialog.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 Host components via Native Messaging. 7 * Class to communicate with the Host components via Native Messaging.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 }; 358 };
359 359
360 /** 360 /**
361 * @return {void} Nothing. 361 * @return {void} Nothing.
362 * @private 362 * @private
363 */ 363 */
364 remoting.HostNativeMessaging.prototype.onDisconnect_ = function() { 364 remoting.HostNativeMessaging.prototype.onDisconnect_ = function() {
365 console.error('Native Message port disconnected'); 365 console.error('Native Message port disconnected');
366 366
367 // Notify the error-handlers of any requests that are still outstanding. 367 // Notify the error-handlers of any requests that are still outstanding.
368 for (var id in this.pendingReplies_) { 368 var pendingReplies = this.pendingReplies_;
369 this.pendingReplies_[/** @type {number} */(id)].onError( 369 this.pendingReplies_ = {};
370
371 for (var id in pendingReplies) {
372 pendingReplies[/** @type {number} */(id)].onError(
370 remoting.Error.UNEXPECTED); 373 remoting.Error.UNEXPECTED);
371 } 374 }
372 this.pendingReplies_ = {};
373 } 375 }
374 376
375 /** 377 /**
376 * @param {function(string):void} onDone Callback to be called with the 378 * @param {function(string):void} onDone Callback to be called with the
377 * local hostname. 379 * local hostname.
378 * @param {function(remoting.Error):void} onError The callback to be triggered 380 * @param {function(remoting.Error):void} onError The callback to be triggered
379 * on error. 381 * on error.
380 * @return {void} Nothing. 382 * @return {void} Nothing.
381 */ 383 */
382 remoting.HostNativeMessaging.prototype.getHostName = 384 remoting.HostNativeMessaging.prototype.getHostName =
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 * on error. 591 * on error.
590 * @return {void} Nothing. 592 * @return {void} Nothing.
591 */ 593 */
592 remoting.HostNativeMessaging.prototype.getCredentialsFromAuthCode = 594 remoting.HostNativeMessaging.prototype.getCredentialsFromAuthCode =
593 function(authorizationCode, onDone, onError) { 595 function(authorizationCode, onDone, onError) {
594 this.postMessage_({ 596 this.postMessage_({
595 type: 'getCredentialsFromAuthCode', 597 type: 'getCredentialsFromAuthCode',
596 authorizationCode: authorizationCode 598 authorizationCode: authorizationCode
597 }, onDone, onError); 599 }, onDone, onError);
598 }; 600 };
OLDNEW
« no previous file with comments | « remoting/webapp/host_list.js ('k') | remoting/webapp/host_setup_dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698