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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 2751403002: Record the fraction of the time without user input - Aura only (Closed)
Patch Set: Add units to histogram Created 3 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window_event_dispatcher.h ('k') | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 78ecee4d4604dcd3bc4fbde6f6c77c4b65b654e4..559c9524748a85e10b0cb0fc40780d28baeb5aef 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -495,6 +495,11 @@ ui::EventDispatchDetails WindowEventDispatcher::PreDispatchEvent(
Window* target_window = static_cast<Window*>(target);
CHECK(window()->Contains(target_window));
+ if (!(event->flags() & ui::EF_IS_SYNTHESIZED)) {
+ fraction_of_time_without_user_input_recorder_.RecordEventAtTime(
+ event->time_stamp());
+ }
+
if (!dispatching_held_event_) {
bool can_be_held = IsEventCandidateForHold(*event);
if (!move_hold_count_ || !can_be_held) {
« no previous file with comments | « ui/aura/window_event_dispatcher.h ('k') | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698