Index: remoting/webapp/base/js/session_logger.js |
diff --git a/remoting/webapp/base/js/session_logger.js b/remoting/webapp/base/js/session_logger.js |
index 7e0341312611873fea054e4d4aa8a02857f95c5a..2f5ee7b235bdcc721a265d88bd38b1f580021cdd 100644 |
--- a/remoting/webapp/base/js/session_logger.js |
+++ b/remoting/webapp/base/js/session_logger.js |
@@ -263,6 +263,21 @@ remoting.SessionLogger.prototype.logStatistics = function(stats) { |
}; |
/** |
+ * Logs connection statistics. |
Lambros
2016/09/28 01:30:39
Wrong comment.
Jamie
2016/09/28 21:14:36
Done.
|
+ * |
+ * @param {{width: number, height: number}} hostSize |
+ * @param {{width: number, height: number}} clientSize |
+ * @param {boolean} clientFullscreen |
+ */ |
+remoting.SessionLogger.prototype.logScreenResolutions = |
+ function(hostSize, clientSize, clientFullscreen) { |
+ this.maybeExpireSessionId_(); |
+ var entry = this.makeScreenResolutions_(hostSize, clientSize, |
+ clientFullscreen); |
+ this.log_(entry); |
+}; |
+ |
+/** |
* @param {remoting.ChromotingEvent.SessionState} state |
* @param {remoting.Error=} opt_error |
* @return {remoting.ChromotingEvent} |
@@ -290,6 +305,26 @@ remoting.SessionLogger.prototype.makeSessionStateChange_ = |
}; |
/** |
+ * @param {{width: number, height: number}} hostSize |
+ * @param {{width: number, height: number}} clientSize |
+ * @param {boolean} clientFullscreen |
+ * @return {remoting.ChromotingEvent} |
+ * @private |
+ */ |
+remoting.SessionLogger.prototype.makeScreenResolutions_ = |
+ function(hostSize, clientSize, clientFullscreen) { |
+ var entry = new remoting.ChromotingEvent( |
+ remoting.ChromotingEvent.Type.SCREEN_RESOLUTIONS); |
+ entry.client_resolution = new remoting.ChromotingEvent.ScreenResolution( |
+ clientSize.width, clientSize.height); |
+ entry.host_resolution = new remoting.ChromotingEvent.ScreenResolution( |
+ hostSize.width, hostSize.height); |
+ entry.client_fullscreen = clientFullscreen; |
+ this.fillEvent_(entry); |
+ return entry; |
+}; |
+ |
+/** |
* @return {remoting.ChromotingEvent} |
* @private |
*/ |