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

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

Issue 944123003: Hack webapp to request keyboard events on connection. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hacked up chromoting client and using mouse lock instead of keyboard lock for bubble. Created 5 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
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 that wraps low-level details of interacting with the client plugin. 7 * Class that wraps low-level details of interacting with the client plugin.
8 * 8 *
9 * This abstracts a <embed> element and controls the plugin which does 9 * This abstracts a <embed> element and controls the plugin which does
10 * the actual remoting work. It also handles differences between 10 * the actual remoting work. It also handles differences between
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 var keyFilter = ''; 594 var keyFilter = '';
595 if (remoting.platformIsMac()) { 595 if (remoting.platformIsMac()) {
596 keyFilter = 'mac'; 596 keyFilter = 'mac';
597 } else if (remoting.platformIsChromeOS()) { 597 } else if (remoting.platformIsChromeOS()) {
598 keyFilter = 'cros'; 598 keyFilter = 'cros';
599 } 599 }
600 // Use PPB_VideoDecoder API only in Chrome 42 and above. It is broken in 600 // Use PPB_VideoDecoder API only in Chrome 42 and above. It is broken in
601 // previous versions of Chrome, see http://crbug.com/447403 . 601 // previous versions of Chrome, see http://crbug.com/447403 .
602 // Currently PPAPI doesn't provide a way for plugins to check the Chrome 602 // Currently PPAPI doesn't provide a way for plugins to check the Chrome
603 // version, so this check needs to be in the webapp. 603 // version, so this check needs to be in the webapp.
604 var enableVideoDecodeRenderer = 604 var enableVideoDecodeRenderer = false;
605 parseInt((remoting.getChromeVersion() || '0').split('.')[0], 10) >= 42;
606 this.plugin_.postMessage(JSON.stringify( 605 this.plugin_.postMessage(JSON.stringify(
607 { method: 'delegateLargeCursors', data: {} })); 606 { method: 'delegateLargeCursors', data: {} }));
608 this.plugin_.postMessage(JSON.stringify( 607 this.plugin_.postMessage(JSON.stringify(
609 { method: 'connect', data: { 608 { method: 'connect', data: {
610 hostJid: hostJid, 609 hostJid: hostJid,
611 hostPublicKey: hostPublicKey, 610 hostPublicKey: hostPublicKey,
612 localJid: localJid, 611 localJid: localJid,
613 sharedSecret: sharedSecret, 612 sharedSecret: sharedSecret,
614 authenticationMethods: authenticationMethods, 613 authenticationMethods: authenticationMethods,
615 authenticationTag: authenticationTag, 614 authenticationTag: authenticationTag,
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { 918 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() {
920 if (remoting.settings.CLIENT_PLUGIN_TYPE != 'pnacl') { 919 if (remoting.settings.CLIENT_PLUGIN_TYPE != 'pnacl') {
921 return; 920 return;
922 } 921 }
923 922
924 var plugin = remoting.ClientPluginImpl.createPluginElement_(); 923 var plugin = remoting.ClientPluginImpl.createPluginElement_();
925 plugin.addEventListener( 924 plugin.addEventListener(
926 'loadend', function() { document.body.removeChild(plugin); }, false); 925 'loadend', function() { document.body.removeChild(plugin); }, false);
927 document.body.appendChild(plugin); 926 document.body.appendChild(plugin);
928 }; 927 };
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_native_app_window.cc ('k') | remoting/webapp/crd/js/desktop_connected_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698