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 handling creation and teardown of a remoting client session. | 7 * Class handling creation and teardown of a remoting client session. |
8 * | 8 * |
9 * The ClientSession class controls lifetime of the client plugin | 9 * The ClientSession class controls lifetime of the client plugin |
10 * object and provides the plugin with the functionality it needs to | 10 * object and provides the plugin with the functionality it needs to |
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1273 // TODO(wez): Handle high-DPI to high-DPI properly (crbug.com/135089). | 1273 // TODO(wez): Handle high-DPI to high-DPI properly (crbug.com/135089). |
1274 this.plugin_.element().style.width = pluginWidth + 'px'; | 1274 this.plugin_.element().style.width = pluginWidth + 'px'; |
1275 this.plugin_.element().style.height = pluginHeight + 'px'; | 1275 this.plugin_.element().style.height = pluginHeight + 'px'; |
1276 | 1276 |
1277 // Position the container. | 1277 // Position the container. |
1278 // Note that clientWidth/Height take into account scrollbars. | 1278 // Note that clientWidth/Height take into account scrollbars. |
1279 var clientWidth = document.documentElement.clientWidth; | 1279 var clientWidth = document.documentElement.clientWidth; |
1280 var clientHeight = document.documentElement.clientHeight; | 1280 var clientHeight = document.documentElement.clientHeight; |
1281 var parentNode = this.plugin_.element().parentNode; | 1281 var parentNode = this.plugin_.element().parentNode; |
1282 | 1282 |
1283 // When we receive the first plugin dimensions from the host, we know that | |
1284 // remote host has started. | |
1285 remoting.app.onHostStarted(); | |
Jamie
2014/12/04 22:56:58
The name of this callback is misleading. If the ho
garykac
2014/12/05 19:55:40
-> onVideoStreamingStarted
| |
1286 | |
1283 console.log('plugin dimensions: ' + | 1287 console.log('plugin dimensions: ' + |
1284 parentNode.style.left + ',' + | 1288 parentNode.style.left + ',' + |
1285 parentNode.style.top + '-' + | 1289 parentNode.style.top + '-' + |
1286 pluginWidth + 'x' + pluginHeight + '.'); | 1290 pluginWidth + 'x' + pluginHeight + '.'); |
1287 }; | 1291 }; |
1288 | 1292 |
1289 /** | 1293 /** |
1290 * Returns an associative array with a set of stats for this connection. | 1294 * Returns an associative array with a set of stats for this connection. |
1291 * | 1295 * |
1292 * @return {remoting.ClientSession.PerfStats} The connection statistics. | 1296 * @return {remoting.ClientSession.PerfStats} The connection statistics. |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1634 * @param {string} data Contents of the extension message. | 1638 * @param {string} data Contents of the extension message. |
1635 * @return {boolean} True if the message was recognized, false otherwise. | 1639 * @return {boolean} True if the message was recognized, false otherwise. |
1636 */ | 1640 */ |
1637 remoting.ClientSession.prototype.handleExtensionMessage = | 1641 remoting.ClientSession.prototype.handleExtensionMessage = |
1638 function(type, data) { | 1642 function(type, data) { |
1639 if (this.videoFrameRecorder_) { | 1643 if (this.videoFrameRecorder_) { |
1640 return this.videoFrameRecorder_.handleMessage(type, data); | 1644 return this.videoFrameRecorder_.handleMessage(type, data); |
1641 } | 1645 } |
1642 return false; | 1646 return false; |
1643 } | 1647 } |
OLD | NEW |