Chromium Code Reviews| 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 574 * @param {remoting.CredentialsProvider} credentialsProvider | 574 * @param {remoting.CredentialsProvider} credentialsProvider |
| 575 */ | 575 */ |
| 576 remoting.ClientPluginImpl.prototype.connect = | 576 remoting.ClientPluginImpl.prototype.connect = |
| 577 function(host, localJid, credentialsProvider) { | 577 function(host, localJid, credentialsProvider) { |
| 578 var keyFilter = ''; | 578 var keyFilter = ''; |
| 579 if (remoting.platformIsMac()) { | 579 if (remoting.platformIsMac()) { |
| 580 keyFilter = 'mac'; | 580 keyFilter = 'mac'; |
| 581 } else if (remoting.platformIsChromeOS()) { | 581 } else if (remoting.platformIsChromeOS()) { |
| 582 keyFilter = 'cros'; | 582 keyFilter = 'cros'; |
| 583 } | 583 } |
| 584 // Use PPB_VideoDecoder API only in Chrome 42 and above. It is broken in | 584 |
| 585 // previous versions of Chrome, see http://crbug.com/447403 . | 585 // PPB_VideoDecoder-based renderer is disabled because it's broken in some |
| 586 // Currently PPAPI doesn't provide a way for plugins to check the Chrome | 586 // scenarios, see crbug.com/459103 and crbug.com/463577 . |
| 587 // version, so this check needs to be in the webapp. | 587 var enableVideoDecodeRenderer = false; |
|
Wez
2015/03/03 19:50:42
Make this a >= 43 check so that we use the VideoDe
Sergey Ulanov
2015/03/03 19:57:12
Done.
| |
| 588 var enableVideoDecodeRenderer = | |
| 589 parseInt((remoting.getChromeVersion() || '0').split('.')[0], 10) >= 42; | |
| 590 this.plugin_.postMessage(JSON.stringify( | 588 this.plugin_.postMessage(JSON.stringify( |
| 591 { method: 'delegateLargeCursors', data: {} })); | 589 { method: 'delegateLargeCursors', data: {} })); |
| 592 var methods = 'third_party,spake2_pair,spake2_hmac,spake2_plain'; | 590 var methods = 'third_party,spake2_pair,spake2_hmac,spake2_plain'; |
| 593 this.credentials_ = credentialsProvider; | 591 this.credentials_ = credentialsProvider; |
| 594 this.useAsyncPinDialog_(); | 592 this.useAsyncPinDialog_(); |
| 595 this.plugin_.postMessage(JSON.stringify( | 593 this.plugin_.postMessage(JSON.stringify( |
| 596 { method: 'connect', data: { | 594 { method: 'connect', data: { |
| 597 hostJid: host.jabberId, | 595 hostJid: host.jabberId, |
| 598 hostPublicKey: host.publicKey, | 596 hostPublicKey: host.publicKey, |
| 599 localJid: localJid, | 597 localJid: localJid, |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 908 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { | 906 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { |
| 909 if (remoting.settings.CLIENT_PLUGIN_TYPE != 'pnacl') { | 907 if (remoting.settings.CLIENT_PLUGIN_TYPE != 'pnacl') { |
| 910 return; | 908 return; |
| 911 } | 909 } |
| 912 | 910 |
| 913 var plugin = remoting.ClientPluginImpl.createPluginElement_(); | 911 var plugin = remoting.ClientPluginImpl.createPluginElement_(); |
| 914 plugin.addEventListener( | 912 plugin.addEventListener( |
| 915 'loadend', function() { document.body.removeChild(plugin); }, false); | 913 'loadend', function() { document.body.removeChild(plugin); }, false); |
| 916 document.body.appendChild(plugin); | 914 document.body.appendChild(plugin); |
| 917 }; | 915 }; |
| OLD | NEW |