| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 this.onPairingComplete_ = function(clientId, sharedSecret) {}; | 77 this.onPairingComplete_ = function(clientId, sharedSecret) {}; |
| 78 /** @type {remoting.ClientSession.PerfStats} */ | 78 /** @type {remoting.ClientSession.PerfStats} */ |
| 79 this.perfStats_ = new remoting.ClientSession.PerfStats(); | 79 this.perfStats_ = new remoting.ClientSession.PerfStats(); |
| 80 | 80 |
| 81 /** @type {remoting.ClientPlugin} */ | 81 /** @type {remoting.ClientPlugin} */ |
| 82 var that = this; | 82 var that = this; |
| 83 /** @param {Event} event Message event from the plugin. */ | 83 /** @param {Event} event Message event from the plugin. */ |
| 84 this.plugin.addEventListener('message', function(event) { | 84 this.plugin.addEventListener('message', function(event) { |
| 85 that.handleMessage_(event.data); | 85 that.handleMessage_(event.data); |
| 86 }, false); | 86 }, false); |
| 87 window.setTimeout(this.showPluginForClickToPlay_.bind(this), 500); | 87 |
| 88 if (remoting.settings.CLIENT_PLUGIN_TYPE == 'native') { |
| 89 window.setTimeout(this.showPluginForClickToPlay_.bind(this), 500); |
| 90 } |
| 88 }; | 91 }; |
| 89 | 92 |
| 90 /** | 93 /** |
| 91 * Set of features for which hasFeature() can be used to test. | 94 * Set of features for which hasFeature() can be used to test. |
| 92 * | 95 * |
| 93 * @enum {string} | 96 * @enum {string} |
| 94 */ | 97 */ |
| 95 remoting.ClientPlugin.Feature = { | 98 remoting.ClientPlugin.Feature = { |
| 96 INJECT_KEY_EVENT: 'injectKeyEvent', | 99 INJECT_KEY_EVENT: 'injectKeyEvent', |
| 97 NOTIFY_CLIENT_RESOLUTION: 'notifyClientResolution', | 100 NOTIFY_CLIENT_RESOLUTION: 'notifyClientResolution', |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 * Undo the CSS rules needed to make the plugin clickable for click-to-play. | 717 * Undo the CSS rules needed to make the plugin clickable for click-to-play. |
| 715 * @private | 718 * @private |
| 716 */ | 719 */ |
| 717 remoting.ClientPlugin.prototype.hidePluginForClickToPlay_ = function() { | 720 remoting.ClientPlugin.prototype.hidePluginForClickToPlay_ = function() { |
| 718 this.plugin.style.width = ''; | 721 this.plugin.style.width = ''; |
| 719 this.plugin.style.height = ''; | 722 this.plugin.style.height = ''; |
| 720 this.plugin.style.top = ''; | 723 this.plugin.style.top = ''; |
| 721 this.plugin.style.left = ''; | 724 this.plugin.style.left = ''; |
| 722 this.plugin.style.position = ''; | 725 this.plugin.style.position = ''; |
| 723 }; | 726 }; |
| OLD | NEW |