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

Side by Side Diff: content/browser/renderer_host/render_widget_host_latency_tracker.h

Issue 786113002: Only terminate latency components when no rendering is scheduled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Histogram fix Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_latency_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_latency_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698