| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/browser_rendering_stats.h" | 5 #include "content/common/browser_rendering_stats.h" |
| 6 | 6 |
| 7 namespace content { | 7 namespace content { |
| 8 | 8 |
| 9 BrowserRenderingStats::BrowserRenderingStats() : | 9 BrowserRenderingStats::BrowserRenderingStats() : |
| 10 input_event_count(0), | 10 input_event_count(0), |
| 11 touch_ui_count(0), | 11 touch_ui_count(0), |
| 12 touch_acked_count(0) { | 12 touch_acked_count(0), |
| 13 scroll_event_count(0) { |
| 13 } | 14 } |
| 14 | 15 |
| 15 BrowserRenderingStats::~BrowserRenderingStats() {} | 16 BrowserRenderingStats::~BrowserRenderingStats() {} |
| 16 | 17 |
| 17 void BrowserRenderingStats::EnumerateFields( | 18 void BrowserRenderingStats::EnumerateFields( |
| 18 cc::RenderingStats::Enumerator* enumerator) const { | 19 cc::RenderingStats::Enumerator* enumerator) const { |
| 19 enumerator->AddInt("inputEventCount", input_event_count); | 20 enumerator->AddInt("inputEventCount", input_event_count); |
| 20 enumerator->AddTimeDeltaInSecondsF("totalInputLatency", total_input_latency); | 21 enumerator->AddTimeDeltaInSecondsF("totalInputLatency", total_input_latency); |
| 21 | 22 |
| 22 enumerator->AddInt("touchUICount", touch_ui_count); | 23 enumerator->AddInt("touchUICount", touch_ui_count); |
| 23 enumerator->AddTimeDeltaInSecondsF("totalTouchUILatency", | 24 enumerator->AddTimeDeltaInSecondsF("totalTouchUILatency", |
| 24 total_touch_ui_latency); | 25 total_touch_ui_latency); |
| 25 | 26 |
| 26 enumerator->AddInt("touchAckedCount", touch_acked_count); | 27 enumerator->AddInt("touchAckedCount", touch_acked_count); |
| 27 enumerator->AddTimeDeltaInSecondsF("totalTouchAckedLatency", | 28 enumerator->AddTimeDeltaInSecondsF("totalTouchAckedLatency", |
| 28 total_touch_acked_latency); | 29 total_touch_acked_latency); |
| 30 |
| 31 enumerator->AddInt("scrollEventCount", scroll_event_count); |
| 32 enumerator->AddTimeDeltaInSecondsF("totalScrollLatency", |
| 33 total_scroll_latency); |
| 29 } | 34 } |
| 30 | 35 |
| 31 } // namespace content | 36 } // namespace content |
| OLD | NEW |