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

Side by Side Diff: chrome/browser/metrics/desktop_engagement_observer.h

Issue 2127143002: Integrate audible tab tracking into desktop engagement service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
(Empty)
1 // Copyright 2016 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_METRICS_DESKTOP_ENGAGEMENT_OBSERVER_H_
6 #define CHROME_BROWSER_METRICS_DESKTOP_ENGAGEMENT_OBSERVER_H_
7
8 #include "base/macros.h"
9 #include "content/public/browser/render_widget_host.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_observer.h"
12 #include "content/public/browser/web_contents_user_data.h"
13 #include "third_party/WebKit/public/web/WebInputEvent.h"
14
15 class DesktopEngagementService;
16
17 class DesktopEngagementObserver
18 : public content::WebContentsObserver,
19 public content::WebContentsUserData<DesktopEngagementObserver>,
20 public content::RenderWidgetHost::InputEventObserver {
21 public:
22 DesktopEngagementObserver(content::WebContents* web_contents,
23 DesktopEngagementService* service);
24 ~DesktopEngagementObserver() override;
25
26 static DesktopEngagementObserver* CreateForWebContents(
27 content::WebContents* web_contents);
28
29 private:
30 friend class content::WebContentsUserData<DesktopEngagementObserver>;
31
32 // Register / Unregister input event callback to given RenderViewHost
33 void RegisterInputEventObserver(content::RenderViewHost* host);
34 void UnregisterInputEventObserver(content::RenderViewHost* host);
35
36 // content::RenderWidgetHost::InputEventObserver:
37 void OnInputEvent(const blink::WebInputEvent& event) override;
38
39 // content::WebContentsObserver:
40 void RenderViewHostChanged(content::RenderViewHost* old_host,
41 content::RenderViewHost* new_host) override;
42
43 DesktopEngagementService* service_;
44
45 DISALLOW_COPY_AND_ASSIGN(DesktopEngagementObserver);
46 };
47
48 #endif // CHROME_BROWSER_METRICS_DESKTOP_ENGAGEMENT_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_visibility_observer.cc ('k') | chrome/browser/metrics/desktop_engagement_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698