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

Unified Diff: ui/events/latency_info.cc

Issue 541033003: Added coordinates information to InputLatency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a few remaining coding style issues Created 6 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: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index 4e817d06432107f2f6a45861ab30b39fefad0b68..03024903ef6e05ff9d97c79edd60e7518afbc5dd 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -117,6 +117,16 @@ scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData(
record_data->Set(GetComponentName(it->first.first), component_info);
}
record_data->SetDouble("trace_id", latency.trace_id);
+
+ scoped_ptr<base::ListValue> coordinates(new base::ListValue());
+ for (size_t i = 0; i < latency.coordinates.size(); i++) {
+ scoped_ptr<base::DictionaryValue> coordinate_pair(
Sami 2014/09/05 17:26:02 Indent++
+ new base::DictionaryValue());
+ coordinate_pair->SetDouble("x", latency.coordinates[i].x());
+ coordinate_pair->SetDouble("y", latency.coordinates[i].y());
+ coordinates->Append(coordinate_pair.release());
+ }
+ record_data->Set("coordinates", coordinates.release());
return LatencyInfoTracedValue::FromValue(record_data.PassAs<base::Value>());
}
« content/browser/renderer_host/render_widget_host_impl.cc ('K') | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698