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

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: update net.gypi Created 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/build-webapp.py ('k') | remoting/webapp/manifest.json.jinja2 » ('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 /** 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 * false otherwise. 356 * false otherwise.
357 * @return {remoting.ClientPlugin} Create plugin object for the locally 357 * @return {remoting.ClientPlugin} Create plugin object for the locally
358 * installed plugin. 358 * installed plugin.
359 */ 359 */
360 remoting.ClientSession.prototype.createClientPlugin_ = 360 remoting.ClientSession.prototype.createClientPlugin_ =
361 function(container, id, onExtensionMessage) { 361 function(container, id, onExtensionMessage) {
362 var plugin = /** @type {remoting.ViewerPlugin} */ 362 var plugin = /** @type {remoting.ViewerPlugin} */
363 document.createElement('embed'); 363 document.createElement('embed');
364 364
365 plugin.id = id; 365 plugin.id = id;
366 plugin.src = 'about://none'; 366 if (remoting.settings.CLIENT_PLUGIN_TYPE == 'pnacl') {
367 plugin.type = 'application/vnd.chromium.remoting-viewer'; 367 plugin.src = 'remoting_client_pnacl.nmf';
368 plugin.type = 'application/x-pnacl';
369 } else if (remoting.settings.CLIENT_PLUGIN_TYPE == 'nacl') {
370 plugin.src = 'remoting_client_nacl.nmf';
371 plugin.type = 'application/x-nacl';
372 } else {
373 plugin.src = 'about://none';
374 plugin.type = 'application/vnd.chromium.remoting-viewer';
375 }
376
368 plugin.width = 0; 377 plugin.width = 0;
369 plugin.height = 0; 378 plugin.height = 0;
370 plugin.tabIndex = 0; // Required, otherwise focus() doesn't work. 379 plugin.tabIndex = 0; // Required, otherwise focus() doesn't work.
371 container.appendChild(plugin); 380 container.appendChild(plugin);
372 381
373 return new remoting.ClientPlugin(plugin, onExtensionMessage); 382 return new remoting.ClientPlugin(plugin, onExtensionMessage);
374 }; 383 };
375 384
376 /** 385 /**
377 * Callback function called when the plugin element gets focus. 386 * Callback function called when the plugin element gets focus.
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 /** 1502 /**
1494 * @return {{width: number, height: number}} The height of the window's client 1503 * @return {{width: number, height: number}} The height of the window's client
1495 * area. This differs between apps v1 and apps v2 due to the custom window 1504 * area. This differs between apps v1 and apps v2 due to the custom window
1496 * borders used by the latter. 1505 * borders used by the latter.
1497 * @private 1506 * @private
1498 */ 1507 */
1499 remoting.ClientSession.prototype.getClientArea_ = function() { 1508 remoting.ClientSession.prototype.getClientArea_ = function() {
1500 return remoting.windowFrame ? 1509 return remoting.windowFrame ?
1501 remoting.windowFrame.getClientArea() : 1510 remoting.windowFrame.getClientArea() :
1502 { 'width': window.innerWidth, 'height': window.innerHeight }; 1511 { 'width': window.innerWidth, 'height': window.innerHeight };
1503 } 1512 }
OLDNEW
« no previous file with comments | « remoting/webapp/build-webapp.py ('k') | remoting/webapp/manifest.json.jinja2 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698