| Index: chrome/browser/engagement/site_engagement_service.h
|
| diff --git a/chrome/browser/engagement/site_engagement_service.h b/chrome/browser/engagement/site_engagement_service.h
|
| index 36b1fd2749788f99be582dd1d8e83e9544af7c31..85dca081d9770655443df8d74bed20efd323f7c8 100644
|
| --- a/chrome/browser/engagement/site_engagement_service.h
|
| +++ b/chrome/browser/engagement/site_engagement_service.h
|
| @@ -38,6 +38,14 @@ class SiteEngagementScore {
|
| // The number of points given for user input (indicating time-on-site).
|
| static double g_user_input_points;
|
|
|
| + // The number of points given for media playing. Initially calibrated such
|
| + // that at least 30 minutes of video watching or audio listening would be
|
| + // required to allow a site to reach the daily engagement maximum.
|
| + static double g_visible_media_playing_points;
|
| +
|
| + // The number of points given for media playing in a non-visible tab.
|
| + static double g_hidden_media_playing_points;
|
| +
|
| // Decaying works by removing a portion of the score periodically. This
|
| // constant determines how often that happens.
|
| static int g_decay_period_in_days;
|
| @@ -149,6 +157,11 @@ class SiteEngagementService : public KeyedService,
|
| void HandleUserInput(const GURL& url,
|
| SiteEngagementMetrics::EngagementType type);
|
|
|
| + // Update the karma score of the origin matching |url| for media playing. The
|
| + // points awarded are discounted if the media is being played in a non-visible
|
| + // tab.
|
| + void HandleMediaPlaying(const GURL& url, bool is_hidden);
|
| +
|
| // Overridden from SiteEngagementScoreProvider:
|
| double GetScore(const GURL& url) override;
|
| double GetTotalEngagementPoints() override;
|
|
|