Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: remoting/webapp/base/js/session_logger.js

Issue 2369013008: Log host and client screen sizes. (Closed)
Patch Set: Rename VIDEO_SIZE to SCREEN_RESOLUTIONS. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
*/

Powered by Google App Engine
This is Rietveld 408576698