| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 user-facing aspects of the client session. | 7 * Class handling user-facing aspects of the client session. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 * borders used by the latter. | 181 * borders used by the latter. |
| 182 * TODO: make private | 182 * TODO: make private |
| 183 */ | 183 */ |
| 184 remoting.DesktopConnectedView.prototype.getClientArea_ = function() { | 184 remoting.DesktopConnectedView.prototype.getClientArea_ = function() { |
| 185 return remoting.windowFrame ? | 185 return remoting.windowFrame ? |
| 186 remoting.windowFrame.getClientArea() : | 186 remoting.windowFrame.getClientArea() : |
| 187 { 'width': window.innerWidth, 'height': window.innerHeight }; | 187 { 'width': window.innerWidth, 'height': window.innerHeight }; |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 /** | 190 /** |
| 191 * @param {number} width |
| 192 * @param {number} height |
| 193 */ |
| 194 remoting.DesktopConnectedView.prototype.setPluginSizeForBumpScrollTesting = |
| 195 function(width, height) { |
| 196 this.pluginWidthForBumpScrollTesting = width; |
| 197 this.pluginHeightForBumpScrollTesting = height; |
| 198 } |
| 199 |
| 200 /** |
| 191 * Notifies the host of the client's current dimensions and DPI. | 201 * Notifies the host of the client's current dimensions and DPI. |
| 192 * Also takes into account per-host scaling factor, if configured. | 202 * Also takes into account per-host scaling factor, if configured. |
| 193 * TODO: private | 203 * TODO: private |
| 194 */ | 204 */ |
| 195 remoting.DesktopConnectedView.prototype.notifyClientResolution_ = function() { | 205 remoting.DesktopConnectedView.prototype.notifyClientResolution_ = function() { |
| 196 var clientArea = this.getClientArea_(); | 206 var clientArea = this.getClientArea_(); |
| 197 this.plugin_.notifyClientResolution(clientArea.width * this.desktopScale_, | 207 this.plugin_.notifyClientResolution(clientArea.width * this.desktopScale_, |
| 198 clientArea.height * this.desktopScale_, | 208 clientArea.height * this.desktopScale_, |
| 199 window.devicePixelRatio); | 209 window.devicePixelRatio); |
| 200 }; | 210 }; |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 * @param {Object} message The parsed extension message data. | 1024 * @param {Object} message The parsed extension message data. |
| 1015 * @return {boolean} True if the message was recognized, false otherwise. | 1025 * @return {boolean} True if the message was recognized, false otherwise. |
| 1016 */ | 1026 */ |
| 1017 remoting.DesktopConnectedView.prototype.handleExtensionMessage = | 1027 remoting.DesktopConnectedView.prototype.handleExtensionMessage = |
| 1018 function(type, message) { | 1028 function(type, message) { |
| 1019 if (this.videoFrameRecorder_) { | 1029 if (this.videoFrameRecorder_) { |
| 1020 return this.videoFrameRecorder_.handleMessage(type, message); | 1030 return this.videoFrameRecorder_.handleMessage(type, message); |
| 1021 } | 1031 } |
| 1022 return false; | 1032 return false; |
| 1023 }; | 1033 }; |
| OLD | NEW |