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. |