OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_STATS_COLLECTION_OBSERVER_H_ | 5 #ifndef CONTENT_RENDERER_STATS_COLLECTION_OBSERVER_H_ |
6 #define CONTENT_RENDERER_STATS_COLLECTION_OBSERVER_H_ | 6 #define CONTENT_RENDERER_STATS_COLLECTION_OBSERVER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/public/renderer/render_view_observer.h" | 10 #include "content/public/renderer/render_view_observer.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // RenderViewObserver implementation | 23 // RenderViewObserver implementation |
24 void DidStartLoading() override; | 24 void DidStartLoading() override; |
25 void DidStopLoading() override; | 25 void DidStopLoading() override; |
26 | 26 |
27 // Timing for the page load start and stop. These functions may return | 27 // Timing for the page load start and stop. These functions may return |
28 // a null time value under various circumstances. | 28 // a null time value under various circumstances. |
29 const base::Time& load_start_time() { return start_time_; } | 29 const base::Time& load_start_time() { return start_time_; } |
30 const base::Time& load_stop_time() { return stop_time_; } | 30 const base::Time& load_stop_time() { return stop_time_; } |
31 | 31 |
32 private: | 32 private: |
| 33 // RenderViewObserver implementation. |
| 34 void OnDestruct() override; |
| 35 |
33 base::Time start_time_; | 36 base::Time start_time_; |
34 base::Time stop_time_; | 37 base::Time stop_time_; |
35 | 38 |
36 DISALLOW_COPY_AND_ASSIGN(StatsCollectionObserver); | 39 DISALLOW_COPY_AND_ASSIGN(StatsCollectionObserver); |
37 }; | 40 }; |
38 | 41 |
39 } // namespace content | 42 } // namespace content |
40 | 43 |
41 #endif // CONTENT_RENDERER_STATS_COLLECTION_OBSERVER_H_ | 44 #endif // CONTENT_RENDERER_STATS_COLLECTION_OBSERVER_H_ |
OLD | NEW |