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

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

Issue 234023003: Build remoting for PNaCl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class handling creation and teardown of a remoting client session. 7 * Class handling creation and teardown of a remoting client session.
8 * 8 *
9 * The ClientSession class controls lifetime of the client plugin 9 * The ClientSession class controls lifetime of the client plugin
10 * object and provides the plugin with the functionality it needs to 10 * object and provides the plugin with the functionality it needs to
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 * false otherwise. 343 * false otherwise.
344 * @return {remoting.ClientPlugin} Create plugin object for the locally 344 * @return {remoting.ClientPlugin} Create plugin object for the locally
345 * installed plugin. 345 * installed plugin.
346 */ 346 */
347 remoting.ClientSession.prototype.createClientPlugin_ = 347 remoting.ClientSession.prototype.createClientPlugin_ =
348 function(container, id, onExtensionMessage) { 348 function(container, id, onExtensionMessage) {
349 var plugin = /** @type {remoting.ViewerPlugin} */ 349 var plugin = /** @type {remoting.ViewerPlugin} */
350 document.createElement('embed'); 350 document.createElement('embed');
351 351
352 plugin.id = id; 352 plugin.id = id;
353 plugin.src = 'about://none'; 353 if (remoting.settings.CLIENT_PLUGIN_TYPE == 'pnacl') {
354 plugin.type = 'application/vnd.chromium.remoting-viewer'; 354 plugin.src = 'remoting_client_pnacl.nmf';
355 plugin.type = 'application/x-pnacl';
356 } else if (remoting.settings.CLIENT_PLUGIN_TYPE == 'nacl') {
357 plugin.src = 'remoting_client_nacl.nmf';
358 plugin.type = 'application/x-nacl';
359 } else {
360 plugin.src = 'about://none';
361 plugin.type = 'application/vnd.chromium.remoting-viewer';
362 }
363
355 plugin.width = 0; 364 plugin.width = 0;
356 plugin.height = 0; 365 plugin.height = 0;
357 plugin.tabIndex = 0; // Required, otherwise focus() doesn't work. 366 plugin.tabIndex = 0; // Required, otherwise focus() doesn't work.
358 container.appendChild(plugin); 367 container.appendChild(plugin);
359 368
360 return new remoting.ClientPlugin(plugin, onExtensionMessage); 369 return new remoting.ClientPlugin(plugin, onExtensionMessage);
361 }; 370 };
362 371
363 /** 372 /**
364 * Callback function called when the plugin element gets focus. 373 * Callback function called when the plugin element gets focus.
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 * supported. 1440 * supported.
1432 * @private 1441 * @private
1433 */ 1442 */
1434 remoting.ClientSession.prototype.createGnubbyAuthHandler_ = function() { 1443 remoting.ClientSession.prototype.createGnubbyAuthHandler_ = function() {
1435 if (this.mode_ == remoting.ClientSession.Mode.ME2ME) { 1444 if (this.mode_ == remoting.ClientSession.Mode.ME2ME) {
1436 this.gnubbyAuthHandler_ = new remoting.GnubbyAuthHandler(this); 1445 this.gnubbyAuthHandler_ = new remoting.GnubbyAuthHandler(this);
1437 // TODO(psj): Move to more generic capabilities mechanism. 1446 // TODO(psj): Move to more generic capabilities mechanism.
1438 this.sendGnubbyAuthMessage({'type': 'control', 'option': 'auth-v1'}); 1447 this.sendGnubbyAuthMessage({'type': 'control', 'option': 'auth-v1'});
1439 } 1448 }
1440 }; 1449 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698