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

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

Issue 2492793004: Add TimeToScrollUpdateSwapBegin2 in RAPPOR (Closed)
Patch Set: Rebase on top of plumbing Created 4 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
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_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "content/browser/renderer_host/event_with_latency_info.h" 13 #include "content/browser/renderer_host/event_with_latency_info.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/common/input/input_event_ack_state.h" 15 #include "content/common/input/input_event_ack_state.h"
16 #include "ui/events/latency_info.h" 16 #include "ui/events/latency_info.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 class RenderWidgetHostImpl;
21
20 // Utility class for tracking the latency of events passing through 22 // Utility class for tracking the latency of events passing through
21 // a given RenderWidgetHost. 23 // a given RenderWidgetHost.
22 class CONTENT_EXPORT RenderWidgetHostLatencyTracker { 24 class CONTENT_EXPORT RenderWidgetHostLatencyTracker {
23 public: 25 public:
24 RenderWidgetHostLatencyTracker(); 26 RenderWidgetHostLatencyTracker(RenderWidgetHostImpl*);
ncarter (slow) 2016/12/08 17:47:14 single-arg ctor should be explicit
Navid Zolghadr 2016/12/09 19:13:28 Done.
25 ~RenderWidgetHostLatencyTracker(); 27 ~RenderWidgetHostLatencyTracker();
26 28
27 // Associates the latency tracker with a given route and process. 29 // Associates the latency tracker with a given route and process.
28 // Called once after the RenderWidgetHost is fully initialized. 30 // Called once after the RenderWidgetHost is fully initialized.
29 void Initialize(int routing_id, int process_id); 31 void Initialize(int routing_id, int process_id);
30 32
31 void ComputeInputLatencyHistograms(blink::WebInputEvent::Type type, 33 void ComputeInputLatencyHistograms(blink::WebInputEvent::Type type,
32 int64_t latency_component_id, 34 int64_t latency_component_id,
33 const ui::LatencyInfo& latency, 35 const ui::LatencyInfo& latency,
34 InputEventAckState ack_result); 36 InputEventAckState ack_result);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 int64_t latency_component_id_; 75 int64_t latency_component_id_;
74 float device_scale_factor_; 76 float device_scale_factor_;
75 bool has_seen_first_gesture_scroll_update_; 77 bool has_seen_first_gesture_scroll_update_;
76 // Whether the current stream of touch events has ever included more than one 78 // Whether the current stream of touch events has ever included more than one
77 // touch point. 79 // touch point.
78 bool multi_finger_gesture_; 80 bool multi_finger_gesture_;
79 // Whether the touch start for the current stream of touch events had its 81 // Whether the touch start for the current stream of touch events had its
80 // default action prevented. Only valid for single finger gestures. 82 // default action prevented. Only valid for single finger gestures.
81 bool touch_start_default_prevented_; 83 bool touch_start_default_prevented_;
82 84
85 RenderWidgetHostImpl* render_widget_host_impl;
86
83 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker); 87 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker);
84 }; 88 };
85 89
86 } // namespace content 90 } // namespace content
87 91
88 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKE R_H_ 92 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698