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

Side by Side Diff: chrome/browser/metrics/chrome_visibility_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 (c) 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_CHROME_VISIBILITY_OBSERVER_H_
6 #define CHROME_BROWSER_METRICS_CHROME_VISIBILITY_OBSERVER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/ui/browser_list_observer.h"
10
11 namespace metrics {
12
13 class ChromeVisibilityObserver : public chrome::BrowserListObserver {
14 public:
15 ChromeVisibilityObserver();
16 ~ChromeVisibilityObserver() override;
17
18 static ChromeVisibilityObserver* GetInstance();
19
20 static void Initialize();
21
22 private:
23 void SendVisibilityChangeEvent(bool active);
24 void CancelVisibilityChange();
25
26 // chrome::BrowserListObserver:
27 void OnBrowserSetLastActive(Browser* browser) override;
28 void OnBrowserNoLongerActive(Browser* browser) override;
29 void OnBrowserAdded(Browser* browser) override;
30 void OnBrowserRemoved(Browser* browser) override;
31
32 int number_of_browsers_;
33 base::WeakPtrFactory<ChromeVisibilityObserver> weak_factory_;
34
35 DISALLOW_COPY_AND_ASSIGN(ChromeVisibilityObserver);
36 };
37
38 } // namespace metrics
39
40 #endif // CHROME_BROWSER_METRICS_CHROME_VISIBILITY_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/audible_contents_tracker.cc ('k') | chrome/browser/metrics/chrome_visibility_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698