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

Side by Side Diff: remoting/webapp/host_controller.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 | « no previous file | remoting/webapp/host_dispatcher.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** @constructor */ 10 /** @constructor */
11 remoting.HostController = function() { 11 remoting.HostController = function() {
12 /** @return {remoting.HostPlugin} */ 12 /** @return {remoting.HostPlugin} */
13 var createPluginForMe2Me = function() { 13 var createPluginForMe2Me = function() {
14 var plugin = remoting.HostSession.createPlugin(); 14 var plugin = remoting.HostSession.createPlugin();
15 /** @type {HTMLElement} @private */ 15 /** @type {HTMLElement} @private */
16 var container = document.getElementById('daemon-plugin-container'); 16 var container = document.getElementById('daemon-plugin-container');
17 container.appendChild(plugin); 17 container.appendChild(plugin);
18 if (plugin.hasOwnProperty('REQUESTED_ACCESS_CODE')) {
19 container.removeChild(plugin);
20 return null;
21 }
18 return plugin; 22 return plugin;
19 }; 23 };
20 24
21 /** @type {remoting.HostDispatcher} @private */ 25 /** @type {remoting.HostDispatcher} @private */
22 this.hostDispatcher_ = new remoting.HostDispatcher(createPluginForMe2Me); 26 this.hostDispatcher_ = new remoting.HostDispatcher(createPluginForMe2Me);
23 27
24 /** @param {string} version */ 28 /** @param {string} version */
25 var printVersion = function(version) { 29 var printVersion = function(version) {
26 if (version == '') { 30 if (version == '') {
27 console.log('Host not installed.'); 31 console.log('Host not installed.');
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 * 469 *
466 * @param {function():void} onDone Completion callback. 470 * @param {function():void} onDone Completion callback.
467 * @param {function(remoting.Error):void} onError Error callback. 471 * @param {function(remoting.Error):void} onError Error callback.
468 * @return {void} 472 * @return {void}
469 */ 473 */
470 remoting.HostController.prototype.clearPairedClients = function( 474 remoting.HostController.prototype.clearPairedClients = function(
471 onDone, onError) { 475 onDone, onError) {
472 this.hostDispatcher_.clearPairedClients(onDone, onError); 476 this.hostDispatcher_.clearPairedClients(onDone, onError);
473 }; 477 };
474 478
479 /**
480 * Returns true if the NPAPI plugin is being used.
481 * @return {boolean}
482 */
483 remoting.HostController.prototype.usingNpapiPlugin = function() {
484 return this.hostDispatcher_.usingNpapiPlugin();
485 }
486
475 /** @type {remoting.HostController} */ 487 /** @type {remoting.HostController} */
476 remoting.hostController = null; 488 remoting.hostController = null;
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/host_dispatcher.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698