Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_METRICS_RENDERER_UPTIME_WEB_CONTENTS_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_METRICS_RENDERER_UPTIME_WEB_CONTENTS_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "content/public/browser/web_contents_observer.h" | |
| 10 #include "content/public/browser/web_contents_user_data.h" | |
| 11 | |
| 12 namespace metrics { | |
| 13 | |
| 14 // Observer for tracking web contents events. | |
| 15 class RendererUptimeWebContentsObserver | |
| 16 : public content::WebContentsObserver, | |
| 17 public content::WebContentsUserData<RendererUptimeWebContentsObserver> { | |
| 18 public: | |
| 19 explicit RendererUptimeWebContentsObserver( | |
| 20 content::WebContents* web_contents); | |
|
Alexei Svitkine (slow)
2017/03/02 16:12:24
I'm not sure this should be public.
keishi
2017/03/08 14:27:44
Moved to private.
| |
| 21 | |
| 22 static RendererUptimeWebContentsObserver* CreateForWebContents( | |
| 23 content::WebContents* web_contents); | |
| 24 | |
| 25 private: | |
| 26 friend class content::WebContentsUserData<RendererUptimeWebContentsObserver>; | |
| 27 | |
| 28 // content::WebContentsObserver: | |
| 29 void DocumentAvailableInMainFrame() override; | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(RendererUptimeWebContentsObserver); | |
| 32 }; | |
| 33 | |
| 34 } // namespace metrics | |
| 35 | |
| 36 #endif // CHROME_BROWSER_METRICS_RENDERER_UPTIME_WEB_CONTENTS_OBSERVER_H_ | |
| OLD | NEW |