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

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

Issue 2693403003: Remove the 10 second delay before user input generates engagement. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/engagement/site_engagement_helper.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 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 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_ 5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_
6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_ 6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "chrome/browser/engagement/site_engagement_metrics.h" 10 #include "chrome/browser/engagement/site_engagement_metrics.h"
(...skipping 12 matching lines...) Expand all
23 class Origin; 23 class Origin;
24 } 24 }
25 25
26 // Per-WebContents class to handle updating the site engagement scores for 26 // Per-WebContents class to handle updating the site engagement scores for
27 // origins. 27 // origins.
28 class SiteEngagementService::Helper 28 class SiteEngagementService::Helper
29 : public content::WebContentsObserver, 29 : public content::WebContentsObserver,
30 public content::WebContentsUserData<SiteEngagementService::Helper> { 30 public content::WebContentsUserData<SiteEngagementService::Helper> {
31 public: 31 public:
32 static void SetSecondsBetweenUserInputCheck(int seconds); 32 static void SetSecondsBetweenUserInputCheck(int seconds);
33 static void SetSecondsTrackingDelayAfterNavigation(int seconds);
34 static void SetSecondsTrackingDelayAfterShow(int seconds); 33 static void SetSecondsTrackingDelayAfterShow(int seconds);
35 34
36 ~Helper() override; 35 ~Helper() override;
37 36
38 void OnEngagementLevelChanged(const GURL& url, 37 void OnEngagementLevelChanged(const GURL& url,
39 blink::mojom::EngagementLevel level); 38 blink::mojom::EngagementLevel level);
40 39
41 private: 40 private:
42 // Class to encapsulate the periodic detection of site engagement. 41 // Class to encapsulate the periodic detection of site engagement.
43 // 42 //
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void WasHidden() override; 183 void WasHidden() override;
185 184
186 InputTracker input_tracker_; 185 InputTracker input_tracker_;
187 MediaTracker media_tracker_; 186 MediaTracker media_tracker_;
188 SiteEngagementService* service_; 187 SiteEngagementService* service_;
189 188
190 DISALLOW_COPY_AND_ASSIGN(Helper); 189 DISALLOW_COPY_AND_ASSIGN(Helper);
191 }; 190 };
192 191
193 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_ 192 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/engagement/site_engagement_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698