OLD | NEW |
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 Loading... |
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 Loading... |
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 }; |
OLD | NEW |