Chromium Code Reviews| 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; | |
|
kelvinp
2015/02/18 18:41:29
make this.pluginWidthForBumpScrollTesting_ private
garykac
2015/02/19 01:48:45
Done.
| |
| 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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1088 * @param {Object} message The parsed extension message data. | 1098 * @param {Object} message The parsed extension message data. |
| 1089 * @return {boolean} True if the message was recognized, false otherwise. | 1099 * @return {boolean} True if the message was recognized, false otherwise. |
| 1090 */ | 1100 */ |
| 1091 remoting.DesktopConnectedView.prototype.handleExtensionMessage = | 1101 remoting.DesktopConnectedView.prototype.handleExtensionMessage = |
| 1092 function(type, message) { | 1102 function(type, message) { |
| 1093 if (this.videoFrameRecorder_) { | 1103 if (this.videoFrameRecorder_) { |
| 1094 return this.videoFrameRecorder_.handleMessage(type, message); | 1104 return this.videoFrameRecorder_.handleMessage(type, message); |
| 1095 } | 1105 } |
| 1096 return false; | 1106 return false; |
| 1097 }; | 1107 }; |
| OLD | NEW |