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

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: 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
« ui/events/latency_info.h ('K') | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index 4e817d06432107f2f6a45861ab30b39fefad0b68..b435df39d0862643d27e19ef58be0b2ec3382e26 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -117,6 +117,18 @@ 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> values(new base::ListValue());
Sami 2014/09/04 19:10:43 |coordinates|
cvicentiu 2014/09/05 17:19:56 Done.
+ printf("Adding coordinates;\n");
+ for (size_t i = 0; i < latency.coordinates.size(); i++) {
+ printf("x = %d, y = %d\n", latency.coordinates[i].first, latency.coordinates[i].second);
+ base::DictionaryValue* coordinatePair = new base::DictionaryValue();
Sami 2014/09/04 19:10:43 scoped_ptr<base::DictionaryValue> coordinate_pair(
Sami 2014/09/04 19:10:43 indent++
cvicentiu 2014/09/05 17:19:56 Done.
+ coordinatePair->SetDouble("x", latency.coordinates[i].first);
+ coordinatePair->SetDouble("y", latency.coordinates[i].second);
+ values->Append(coordinatePair);
+ }
+ record_data->Set("coordinates", values.release());
+ printf("Added coordinates");
return LatencyInfoTracedValue::FromValue(record_data.PassAs<base::Value>());
}
« ui/events/latency_info.h ('K') | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698