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

Side by Side Diff: chrome/browser/media/media_engagement_service.h

Issue 2840813002: Media Engagement: implement shell of the media engagement service. (Closed)
Patch Set: rebase Created 3 years, 7 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 | « chrome/browser/media/OWNERS ('k') | chrome/browser/media/media_engagement_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_ENGAGEMENT_SERVICE_H_
6 #define CHROME_BROWSER_MEDIA_MEDIA_ENGAGEMENT_SERVICE_H_
7
8 #include <set>
9
10 #include "base/macros.h"
11 #include "components/keyed_service/core/keyed_service.h"
12
13 class Profile;
14
15 namespace content {
16 class WebContents;
17 } // namespace content
18
19 class MediaEngagementService : public KeyedService {
20 public:
21 // Returns the instance attached to the given |profile|.
22 static MediaEngagementService* Get(Profile* profile);
23
24 // Returns whether the feature is enabled.
25 static bool IsEnabled();
26
27 // Observe the given |web_contents| by creating an internal
28 // WebContentsObserver.
29 static void CreateWebContentsObserver(content::WebContents* web_contents);
30
31 explicit MediaEngagementService(Profile* profile);
32 ~MediaEngagementService() override;
33
34 private:
35 class ContentsObserver;
36
37 std::set<ContentsObserver*> contents_observers_;
38
39 DISALLOW_COPY_AND_ASSIGN(MediaEngagementService);
40 };
41
42 #endif // CHROME_BROWSER_MEDIA_MEDIA_ENGAGEMENT_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/OWNERS ('k') | chrome/browser/media/media_engagement_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698