| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "content/browser/renderer_host/event_with_latency_info.h" | 11 #include "content/browser/renderer_host/event_with_latency_info.h" |
| 12 #include "content/common/content_export.h" |
| 12 #include "ui/events/latency_info.h" | 13 #include "ui/events/latency_info.h" |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 | 16 |
| 16 // Utility class for tracking the latency of events passing through | 17 // Utility class for tracking the latency of events passing through |
| 17 // a given RenderWidgetHost. | 18 // a given RenderWidgetHost. |
| 18 class RenderWidgetHostLatencyTracker { | 19 class CONTENT_EXPORT RenderWidgetHostLatencyTracker { |
| 19 public: | 20 public: |
| 20 RenderWidgetHostLatencyTracker(); | 21 RenderWidgetHostLatencyTracker(); |
| 21 ~RenderWidgetHostLatencyTracker(); | 22 ~RenderWidgetHostLatencyTracker(); |
| 22 | 23 |
| 23 // Associates the latency tracker with a given route and process. | 24 // Associates the latency tracker with a given route and process. |
| 24 // Called once after the RenderWidgetHost is fully initialized. | 25 // Called once after the RenderWidgetHost is fully initialized. |
| 25 void Initialize(int routing_id, int process_id); | 26 void Initialize(int routing_id, int process_id); |
| 26 | 27 |
| 27 // Populates the LatencyInfo with relevant entries for latency tracking. | 28 // Populates the LatencyInfo with relevant entries for latency tracking. |
| 28 // Called when an event is received by the RenderWidgetHost, prior to | 29 // Called when an event is received by the RenderWidgetHost, prior to |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 int64 last_event_id_; | 62 int64 last_event_id_; |
| 62 int64 latency_component_id_; | 63 int64 latency_component_id_; |
| 63 float device_scale_factor_; | 64 float device_scale_factor_; |
| 64 | 65 |
| 65 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker); | 66 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace content | 69 } // namespace content |
| 69 | 70 |
| 70 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_ | 71 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_ |
| OLD | NEW |