[email protected] | 3639aa8 | 2013-06-04 11:00:04 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "content/common/browser_rendering_stats.h" |
| 6 | |
| 7 | namespace content { |
| 8 | |
[email protected] | 65a84eb | 2013-06-29 01:22:21 | [diff] [blame] | 9 | BrowserRenderingStats::BrowserRenderingStats() : |
| 10 | input_event_count(0), |
| 11 | touch_ui_count(0), |
[email protected] | 734a1bd7 | 2013-07-17 05:12:16 | [diff] [blame] | 12 | touch_acked_count(0), |
| 13 | scroll_update_count(0) { |
[email protected] | 65a84eb | 2013-06-29 01:22:21 | [diff] [blame] | 14 | } |
[email protected] | 3639aa8 | 2013-06-04 11:00:04 | [diff] [blame] | 15 | |
| 16 | BrowserRenderingStats::~BrowserRenderingStats() {} |
| 17 | |
| 18 | void BrowserRenderingStats::EnumerateFields( |
| 19 | cc::RenderingStats::Enumerator* enumerator) const { |
| 20 | enumerator->AddInt("inputEventCount", input_event_count); |
| 21 | enumerator->AddTimeDeltaInSecondsF("totalInputLatency", total_input_latency); |
[email protected] | 65a84eb | 2013-06-29 01:22:21 | [diff] [blame] | 22 | |
| 23 | enumerator->AddInt("touchUICount", touch_ui_count); |
| 24 | enumerator->AddTimeDeltaInSecondsF("totalTouchUILatency", |
| 25 | total_touch_ui_latency); |
| 26 | |
| 27 | enumerator->AddInt("touchAckedCount", touch_acked_count); |
| 28 | enumerator->AddTimeDeltaInSecondsF("totalTouchAckedLatency", |
| 29 | total_touch_acked_latency); |
[email protected] | 734a1bd7 | 2013-07-17 05:12:16 | [diff] [blame] | 30 | |
| 31 | enumerator->AddInt("scrollUpdateCount", scroll_update_count); |
| 32 | enumerator->AddTimeDeltaInSecondsF("totalScrollUpdateLatency", |
| 33 | total_scroll_update_latency); |
[email protected] | 3639aa8 | 2013-06-04 11:00:04 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | } // namespace content |