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

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

Issue 2793863002: Revert of Remove the 10 second delay before user input generates engagement. (Closed)
Patch Set: Created 3 years, 8 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);
33 static void SetSecondsTrackingDelayAfterShow(int seconds); 34 static void SetSecondsTrackingDelayAfterShow(int seconds);
34 35
35 ~Helper() override; 36 ~Helper() override;
36 37
37 void OnEngagementLevelChanged(const GURL& url, 38 void OnEngagementLevelChanged(const GURL& url,
38 blink::mojom::EngagementLevel level); 39 blink::mojom::EngagementLevel level);
39 40
40 private: 41 private:
41 // Class to encapsulate the periodic detection of site engagement. 42 // Class to encapsulate the periodic detection of site engagement.
42 // 43 //
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 void WasHidden() override; 184 void WasHidden() override;
184 185
185 InputTracker input_tracker_; 186 InputTracker input_tracker_;
186 MediaTracker media_tracker_; 187 MediaTracker media_tracker_;
187 SiteEngagementService* service_; 188 SiteEngagementService* service_;
188 189
189 DISALLOW_COPY_AND_ASSIGN(Helper); 190 DISALLOW_COPY_AND_ASSIGN(Helper);
190 }; 191 };
191 192
192 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_ 193 #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