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_UI_VIEWS_FRAME_BROWSER_VIEW_HISTOGRAM_HELPER_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_HISTOGRAM_HELPER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/time/time.h" | |
| 10 #include "ui/compositor/compositor_observer.h" | |
| 11 | |
| 12 // Class that encapsulates logic of recording BrowserView.Paint-histograms. | |
| 13 class BrowserViewHistogramHelper : public ui::CompositorObserver { | |
| 14 public: | |
| 15 BrowserViewHistogramHelper(); | |
|
Peter Kasting
2017/03/24 22:39:18
Nit: Feel free to use =default
themblsha
2017/03/31 14:32:31
Seems to be no longer applicable with ScopedObserv
| |
| 16 ~BrowserViewHistogramHelper(); | |
| 17 | |
| 18 void OnDidPaintChildren(ui::Compositor* compositor); | |
| 19 | |
| 20 private: | |
| 21 void RemoveCompositorObserver(); | |
| 22 | |
| 23 // ui::CompositorObserver: | |
| 24 void OnCompositingDidCommit(ui::Compositor* compositor) override {} | |
| 25 void OnCompositingStarted(ui::Compositor* compositor, | |
| 26 base::TimeTicks start_time) override {} | |
| 27 void OnCompositingEnded(ui::Compositor* compositor) override; | |
| 28 void OnCompositingLockStateChanged(ui::Compositor* compositor) override {} | |
| 29 void OnCompositingShuttingDown(ui::Compositor* compositor) override; | |
| 30 | |
| 31 ui::Compositor* compositor_ = nullptr; | |
| 32 | |
|
Peter Kasting
2017/03/24 22:39:18
Nit: Blank line unnecessary
themblsha
2017/03/31 14:32:31
Done.
| |
| 33 bool did_first_paint_ = false; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(BrowserViewHistogramHelper); | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_HISTOGRAM_HELPER_H_ | |
| OLD | NEW |