OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_LOAD_METRICS_RENDER_FRAME_OBS
ERVER_H_ | 5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_LOAD_METRICS_RENDER_FRAME_OBS
ERVER_H_ |
6 #define COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_LOAD_METRICS_RENDER_FRAME_OBS
ERVER_H_ | 6 #define COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_LOAD_METRICS_RENDER_FRAME_OBS
ERVER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 public: | 26 public: |
27 explicit MetricsRenderFrameObserver(content::RenderFrame* render_frame); | 27 explicit MetricsRenderFrameObserver(content::RenderFrame* render_frame); |
28 ~MetricsRenderFrameObserver() override; | 28 ~MetricsRenderFrameObserver() override; |
29 | 29 |
30 // RenderFrameObserver implementation | 30 // RenderFrameObserver implementation |
31 void DidChangePerformanceTiming() override; | 31 void DidChangePerformanceTiming() override; |
32 void DidObserveLoadingBehavior( | 32 void DidObserveLoadingBehavior( |
33 blink::WebLoadingBehaviorFlag behavior) override; | 33 blink::WebLoadingBehaviorFlag behavior) override; |
34 void DidCommitProvisionalLoad(bool is_new_navigation, | 34 void DidCommitProvisionalLoad(bool is_new_navigation, |
35 bool is_same_page_navigation) override; | 35 bool is_same_page_navigation) override; |
| 36 void OnDestruct() override; |
36 | 37 |
37 private: | 38 private: |
38 // Will be null when we're not actively sending metrics. | 39 // Will be null when we're not actively sending metrics. |
39 std::unique_ptr<PageTimingMetricsSender> page_timing_metrics_sender_; | 40 std::unique_ptr<PageTimingMetricsSender> page_timing_metrics_sender_; |
40 | 41 |
41 void SendMetrics(); | 42 void SendMetrics(); |
42 virtual bool ShouldSendMetrics() const; | 43 virtual bool ShouldSendMetrics() const; |
43 virtual PageLoadTiming GetTiming() const; | 44 virtual PageLoadTiming GetTiming() const; |
44 virtual std::unique_ptr<base::Timer> CreateTimer() const; | 45 virtual std::unique_ptr<base::Timer> CreateTimer() const; |
45 virtual bool HasNoRenderFrame() const; | 46 virtual bool HasNoRenderFrame() const; |
46 | 47 |
47 DISALLOW_COPY_AND_ASSIGN(MetricsRenderFrameObserver); | 48 DISALLOW_COPY_AND_ASSIGN(MetricsRenderFrameObserver); |
48 }; | 49 }; |
49 | 50 |
50 } // namespace page_load_metrics | 51 } // namespace page_load_metrics |
51 | 52 |
52 #endif // COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_LOAD_METRICS_RENDER_FRAME_
OBSERVER_H_ | 53 #endif // COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_LOAD_METRICS_RENDER_FRAME_
OBSERVER_H_ |
OLD | NEW |