| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_METRICS_DESKTOP_SESSION_DURATION_DESKTOP_SESSION_DURATION
_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_DESKTOP_SESSION_DURATION_DESKTOP_SESSION_DURATION
_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_METRICS_DESKTOP_SESSION_DURATION_DESKTOP_SESSION_DURATION
_OBSERVER_H_ | 6 #define CHROME_BROWSER_METRICS_DESKTOP_SESSION_DURATION_DESKTOP_SESSION_DURATION
_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/browser/render_widget_host.h" | 9 #include "content/public/browser/render_widget_host.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| 11 #include "content/public/browser/web_contents_observer.h" | 11 #include "content/public/browser/web_contents_observer.h" |
| 12 #include "content/public/browser/web_contents_user_data.h" | 12 #include "content/public/browser/web_contents_user_data.h" |
| 13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 14 | 14 |
| 15 namespace metrics { | 15 namespace metrics { |
| 16 | 16 |
| 17 class DesktopSessionDurationTracker; | 17 class DesktopSessionDurationTracker; |
| 18 | 18 |
| 19 // Tracks user input events from web contents and notifies | 19 // Tracks user input events from web contents and notifies |
| 20 // |DesktopSessionDurationTracker|. | 20 // |DesktopSessionDurationTracker|. |
| 21 class DesktopSessionDurationObserver | 21 class DesktopSessionDurationObserver |
| 22 : public content::WebContentsObserver, | 22 : public content::WebContentsObserver, |
| 23 public content::WebContentsUserData<DesktopSessionDurationObserver>, | 23 public content::WebContentsUserData<DesktopSessionDurationObserver>, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 45 content::RenderViewHost* new_host) override; | 45 content::RenderViewHost* new_host) override; |
| 46 | 46 |
| 47 DesktopSessionDurationTracker* service_; | 47 DesktopSessionDurationTracker* service_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(DesktopSessionDurationObserver); | 49 DISALLOW_COPY_AND_ASSIGN(DesktopSessionDurationObserver); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace metrics | 52 } // namespace metrics |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_METRICS_DESKTOP_SESSION_DURATION_DESKTOP_SESSION_DURAT
ION_OBSERVER_H_ | 54 #endif // CHROME_BROWSER_METRICS_DESKTOP_SESSION_DURATION_DESKTOP_SESSION_DURAT
ION_OBSERVER_H_ |
| OLD | NEW |