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

Unified Diff: remoting/client/plugin/chromoting_scriptable_object.cc

Issue 6792038: Chromoting to report roundtrip latency (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add scriptable interface Created 9 years, 9 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/client/plugin/chromoting_scriptable_object.cc
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
index 714be1f0307a5a9e71cc02d19a96c93e1cd53a83..aa653e9fbf38e2852c1729c643fcc45e3e086654 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -32,6 +32,7 @@ const char kVideoCaptureLatencyAttribute[] = "videoCaptureLatency";
const char kVideoEncodeLatencyAttribute[] = "videoEncodeLatency";
const char kVideoDecodeLatencyAttribute[] = "videoDecodeLatency";
const char kVideoRenderLatencyAttribute[] = "videoRenderLatency";
+const char kRoundTripLatencyAttribute[] = "roundTripLatency";
} // namespace
@@ -81,6 +82,7 @@ void ChromotingScriptableObject::Init() {
AddAttribute(kVideoEncodeLatencyAttribute, Var());
AddAttribute(kVideoDecodeLatencyAttribute, Var());
AddAttribute(kVideoRenderLatencyAttribute, Var());
+ AddAttribute(kRoundTripLatencyAttribute, Var());
AddMethod("connect", &ChromotingScriptableObject::DoConnect);
AddMethod("connectSandboxed",
@@ -151,6 +153,8 @@ Var ChromotingScriptableObject::GetProperty(const Var& name, Var* exception) {
return instance_->GetStats()->video_decode_ms()->Average();
if (name.AsString() == kVideoRenderLatencyAttribute)
return instance_->GetStats()->video_paint_ms()->Average();
+ if (name.AsString() == kRoundTripLatencyAttribute)
+ return instance_->GetStats()->round_trip_ms()->Average();
// TODO(ajwong): This incorrectly return a null object if a function
// property is requested.

Powered by Google App Engine
This is Rietveld 408576698