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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } else if (message.method == 'onFirstFrameReceived') { | 257 } else if (message.method == 'onFirstFrameReceived') { |
258 handler.onFirstFrameReceived(); | 258 handler.onFirstFrameReceived(); |
259 | 259 |
260 } | 260 } |
261 } | 261 } |
262 | 262 |
263 if (message.method == 'hello') { | 263 if (message.method == 'hello') { |
264 this.onInitializedDeferred_.resolve(); | 264 this.onInitializedDeferred_.resolve(); |
265 } else if (message.method == 'onDesktopSize') { | 265 } else if (message.method == 'onDesktopSize') { |
266 this.hostDesktop_.onSizeUpdated(message); | 266 this.hostDesktop_.onSizeUpdated(message); |
267 } else if (message.method == 'onDesktopShape') { | |
268 this.hostDesktop_.onShapeUpdated(message); | |
269 } else if (message.method == 'onPerfStats') { | 267 } else if (message.method == 'onPerfStats') { |
270 // Return value is ignored. These calls will throw an error if the value | 268 // Return value is ignored. These calls will throw an error if the value |
271 // is not a number. | 269 // is not a number. |
272 base.getNumberAttr(message.data, 'videoBandwidth'); | 270 base.getNumberAttr(message.data, 'videoBandwidth'); |
273 base.getNumberAttr(message.data, 'videoFrameRate'); | 271 base.getNumberAttr(message.data, 'videoFrameRate'); |
274 base.getNumberAttr(message.data, 'captureLatency'); | 272 base.getNumberAttr(message.data, 'captureLatency'); |
275 base.getNumberAttr(message.data, 'encodeLatency'); | 273 base.getNumberAttr(message.data, 'encodeLatency'); |
276 base.getNumberAttr(message.data, 'decodeLatency'); | 274 base.getNumberAttr(message.data, 'decodeLatency'); |
277 base.getNumberAttr(message.data, 'renderLatency'); | 275 base.getNumberAttr(message.data, 'renderLatency'); |
278 base.getNumberAttr(message.data, 'roundtripLatency'); | 276 base.getNumberAttr(message.data, 'roundtripLatency'); |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 return new remoting.ClientPluginImpl(container, | 761 return new remoting.ClientPluginImpl(container, |
764 capabilities); | 762 capabilities); |
765 }; | 763 }; |
766 | 764 |
767 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { | 765 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { |
768 var plugin = remoting.ClientPluginImpl.createPluginElement_(); | 766 var plugin = remoting.ClientPluginImpl.createPluginElement_(); |
769 plugin.addEventListener( | 767 plugin.addEventListener( |
770 'loadend', function() { document.body.removeChild(plugin); }, false); | 768 'loadend', function() { document.body.removeChild(plugin); }, false); |
771 document.body.appendChild(plugin); | 769 document.body.appendChild(plugin); |
772 }; | 770 }; |
OLD | NEW |