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 // `7MM"""Mq. `7MM | 5 // `7MM"""Mq. `7MM |
6 // MM `MM. MM | 6 // MM `MM. MM |
7 // MM ,M9 .gP"Ya ,6"Yb. ,M""bMM `7MMpMMMb.pMMMb. .gP"Ya | 7 // MM ,M9 .gP"Ya ,6"Yb. ,M""bMM `7MMpMMMb.pMMMb. .gP"Ya |
8 // MMmmdM9 ,M' Yb 8) MM ,AP MM MM MM MM ,M' Yb | 8 // MMmmdM9 ,M' Yb 8) MM ,AP MM MM MM MM ,M' Yb |
9 // MM YM. 8M"""""" ,pm9MM 8MI MM MM MM MM 8M"""""" | 9 // MM YM. 8M"""""" ,pm9MM 8MI MM MM MM MM 8M"""""" |
10 // MM `Mb.YM. , 8M MM `Mb MM MM MM MM YM. , | 10 // MM `Mb.YM. , 8M MM `Mb MM MM MM MM YM. , |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 /** | 113 /** |
114 * Elapsed time since the last host heartbeat in milliseconds. | 114 * Elapsed time since the last host heartbeat in milliseconds. |
115 * @type {number} | 115 * @type {number} |
116 */ | 116 */ |
117 this.host_last_heartbeat_elapsed_time; | 117 this.host_last_heartbeat_elapsed_time; |
118 /** | 118 /** |
119 * To track features like number of ESC key press in a session. | 119 * To track features like number of ESC key press in a session. |
120 * @type {remoting.ChromotingEvent.FeatureTracker} | 120 * @type {remoting.ChromotingEvent.FeatureTracker} |
121 */ | 121 */ |
122 this.feature_tracker; | 122 this.feature_tracker; |
| 123 /** @type {remoting.ChromotingEvent.ScreenResolution} */ |
| 124 this.client_resolution; |
| 125 /** @type {remoting.ChromotingEvent.ScreenResolution} */ |
| 126 this.host_resolution; |
| 127 /** @type {boolean} */ |
| 128 this.client_fullscreen; |
| 129 |
123 this.init_(); | 130 this.init_(); |
124 }; | 131 }; |
125 | 132 |
126 /** @private */ | 133 /** @private */ |
127 remoting.ChromotingEvent.prototype.init_ = function() { | 134 remoting.ChromotingEvent.prototype.init_ = function() { |
128 // System Info. | 135 // System Info. |
129 var systemInfo = remoting.getSystemInfo(); | 136 var systemInfo = remoting.getSystemInfo(); |
130 this.cpu = systemInfo.cpu; | 137 this.cpu = systemInfo.cpu; |
131 this.os_version = systemInfo.osVersion; | 138 this.os_version = systemInfo.osVersion; |
132 if (systemInfo.osName === remoting.Os.WINDOWS) { | 139 if (systemInfo.osName === remoting.Os.WINDOWS) { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 /** | 230 /** |
224 * For tracking features like keypress count. | 231 * For tracking features like keypress count. |
225 * All counting fields will be initialized to 0. | 232 * All counting fields will be initialized to 0. |
226 * @constructor | 233 * @constructor |
227 */ | 234 */ |
228 remoting.ChromotingEvent.FeatureTracker = function() { | 235 remoting.ChromotingEvent.FeatureTracker = function() { |
229 /** @type {number} */ | 236 /** @type {number} */ |
230 this.fullscreen_esc_count = 0; | 237 this.fullscreen_esc_count = 0; |
231 }; | 238 }; |
232 | 239 |
| 240 /** |
| 241 * Client or host screen resolution. |
| 242 * @param {number} width |
| 243 * @param {number} height |
| 244 * @constructor |
| 245 */ |
| 246 remoting.ChromotingEvent.ScreenResolution = function(width, height) { |
| 247 /** @type {number} */ |
| 248 this.width = width; |
| 249 /** @type {number} */ |
| 250 this.height = height; |
| 251 }; |
| 252 |
233 })(); | 253 })(); |
234 | 254 |
235 /** | 255 /** |
236 * @enum {number} | 256 * @enum {number} |
237 */ | 257 */ |
238 remoting.ChromotingEvent.Type = { | 258 remoting.ChromotingEvent.Type = { |
239 SESSION_STATE: 1, | 259 SESSION_STATE: 1, |
240 CONNECTION_STATISTICS: 2, | 260 CONNECTION_STATISTICS: 2, |
241 SESSION_ID_OLD: 3, | 261 SESSION_ID_OLD: 3, |
242 SESSION_ID_NEW: 4, | 262 SESSION_ID_NEW: 4, |
243 HEARTBEAT: 5, | 263 HEARTBEAT: 5, |
244 HEARTBEAT_REJECTED: 6, | 264 HEARTBEAT_REJECTED: 6, |
245 RESTART: 7, | 265 RESTART: 7, |
246 HOST_STATUS: 8, | 266 HOST_STATUS: 8, |
247 SIGNAL_STRATEGY_PROGRESS: 9, | 267 SIGNAL_STRATEGY_PROGRESS: 9, |
248 FEATURE_TRACKING: 10 | 268 FEATURE_TRACKING: 10, |
| 269 SCREEN_RESOLUTIONS: 11, |
249 }; | 270 }; |
250 | 271 |
251 /** @enum {number} */ | 272 /** @enum {number} */ |
252 remoting.ChromotingEvent.Role = { | 273 remoting.ChromotingEvent.Role = { |
253 CLIENT: 0, | 274 CLIENT: 0, |
254 HOST: 1 | 275 HOST: 1 |
255 }; | 276 }; |
256 | 277 |
257 /** @enum {number} */ | 278 /** @enum {number} */ |
258 remoting.ChromotingEvent.Os = { | 279 remoting.ChromotingEvent.Os = { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 FAILED_LATE: 5 | 394 FAILED_LATE: 5 |
374 }; | 395 }; |
375 | 396 |
376 /** @enum {number} */ | 397 /** @enum {number} */ |
377 remoting.ChromotingEvent.AuthMethod = { | 398 remoting.ChromotingEvent.AuthMethod = { |
378 PIN: 1, | 399 PIN: 1, |
379 ACCESS_CODE: 2, | 400 ACCESS_CODE: 2, |
380 PINLESS: 3, | 401 PINLESS: 3, |
381 THIRD_PARTY: 4, | 402 THIRD_PARTY: 4, |
382 }; | 403 }; |
OLD | NEW |