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

Side by Side Diff: chrome/browser/engagement/site_engagement_helper.cc

Issue 1748553002: Replace MouseWheel events with GestureScrollBegin in WebContentsObserver::DidGetUserInteraction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-didgetusergesture
Patch Set: Addressing reviewer comments Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/engagement/site_engagement_helper.h" 5 #include "chrome/browser/engagement/site_engagement_helper.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 case blink::WebInputEvent::RawKeyDown: 95 case blink::WebInputEvent::RawKeyDown:
96 helper()->RecordUserInput(SiteEngagementMetrics::ENGAGEMENT_KEYPRESS); 96 helper()->RecordUserInput(SiteEngagementMetrics::ENGAGEMENT_KEYPRESS);
97 break; 97 break;
98 case blink::WebInputEvent::MouseDown: 98 case blink::WebInputEvent::MouseDown:
99 helper()->RecordUserInput(SiteEngagementMetrics::ENGAGEMENT_MOUSE); 99 helper()->RecordUserInput(SiteEngagementMetrics::ENGAGEMENT_MOUSE);
100 break; 100 break;
101 case blink::WebInputEvent::GestureTapDown: 101 case blink::WebInputEvent::GestureTapDown:
102 helper()->RecordUserInput( 102 helper()->RecordUserInput(
103 SiteEngagementMetrics::ENGAGEMENT_TOUCH_GESTURE); 103 SiteEngagementMetrics::ENGAGEMENT_TOUCH_GESTURE);
104 break; 104 break;
105 case blink::WebInputEvent::MouseWheel: 105 case blink::WebInputEvent::GestureScrollBegin:
106 helper()->RecordUserInput(SiteEngagementMetrics::ENGAGEMENT_WHEEL); 106 helper()->RecordUserInput(SiteEngagementMetrics::ENGAGEMENT_SCROLL);
107 break; 107 break;
108 case blink::WebInputEvent::Undefined: 108 case blink::WebInputEvent::Undefined:
109 // Explicitly ignore browser-initiated navigation input. 109 // Explicitly ignore browser-initiated navigation input.
110 break; 110 break;
111 default: 111 default:
112 NOTREACHED(); 112 NOTREACHED();
113 } 113 }
114 Pause(); 114 Pause();
115 } 115 }
116 116
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 // static 260 // static
261 void SiteEngagementHelper::SetSecondsTrackingDelayAfterNavigation(int seconds) { 261 void SiteEngagementHelper::SetSecondsTrackingDelayAfterNavigation(int seconds) {
262 g_seconds_delay_after_navigation = seconds; 262 g_seconds_delay_after_navigation = seconds;
263 } 263 }
264 264
265 // static 265 // static
266 void SiteEngagementHelper::SetSecondsTrackingDelayAfterShow(int seconds) { 266 void SiteEngagementHelper::SetSecondsTrackingDelayAfterShow(int seconds) {
267 g_seconds_delay_after_show = seconds; 267 g_seconds_delay_after_show = seconds;
268 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698