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 CHROME_RENDERER_PAGE_LOAD_METRICS_METRICS_RENDER_FRAME_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_PAGE_LOAD_METRICS_METRICS_RENDER_FRAME_OBSERVER_H_ |
6 #define CHROME_RENDERER_PAGE_LOAD_METRICS_METRICS_RENDER_FRAME_OBSERVER_H_ | 6 #define CHROME_RENDERER_PAGE_LOAD_METRICS_METRICS_RENDER_FRAME_OBSERVER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
41 // Invoked when a frame is going away. This is our last chance to send IPCs | 41 // Invoked when a frame is going away. This is our last chance to send IPCs |
42 // before being destroyed. | 42 // before being destroyed. |
43 void FrameDetached() override; | 43 void FrameDetached() override; |
44 | 44 |
45 private: | 45 private: |
46 // Will be null when we're not actively sending metrics. | 46 // Will be null when we're not actively sending metrics. |
47 std::unique_ptr<PageTimingMetricsSender> page_timing_metrics_sender_; | 47 std::unique_ptr<PageTimingMetricsSender> page_timing_metrics_sender_; |
48 | 48 |
49 void SendMetrics(); | 49 void SendMetrics(); |
50 virtual bool ShouldSendMetrics() const; | 50 virtual bool ShouldSendMetrics() const; |
51 virtual PageLoadTiming GetTiming() const; | 51 virtual mojo::StructPtr<mojom::PageLoadTiming> GetTiming() const; |
Ken Rockot(use gerrit already)
2017/05/15 17:26:34
nit: please use mojom::PageLoadTimingPtr instead o
Bryan McQuade
2017/05/15 17:38:24
FWIW, I worry a little bit about using PageLoadTim
lpy
2017/05/15 22:40:18
Done.
| |
52 virtual std::unique_ptr<base::Timer> CreateTimer() const; | 52 virtual std::unique_ptr<base::Timer> CreateTimer() const; |
53 virtual bool HasNoRenderFrame() const; | 53 virtual bool HasNoRenderFrame() const; |
54 virtual bool IsMainFrame() const; | 54 virtual bool IsMainFrame() const; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(MetricsRenderFrameObserver); | 56 DISALLOW_COPY_AND_ASSIGN(MetricsRenderFrameObserver); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace page_load_metrics | 59 } // namespace page_load_metrics |
60 | 60 |
61 #endif // CHROME_RENDERER_PAGE_LOAD_METRICS_METRICS_RENDER_FRAME_OBSERVER_H_ | 61 #endif // CHROME_RENDERER_PAGE_LOAD_METRICS_METRICS_RENDER_FRAME_OBSERVER_H_ |
OLD | NEW |