| 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 PaintTiming_h | 5 #ifndef PaintTiming_h |
| 6 #define PaintTiming_h | 6 #define PaintTiming_h |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/paint/FirstMeaningfulPaintDetector.h" | 9 #include "core/paint/FirstMeaningfulPaintDetector.h" |
| 10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 double firstMeaningfulPaint() const { return m_firstMeaningfulPaint; } | 71 double firstMeaningfulPaint() const { return m_firstMeaningfulPaint; } |
| 72 | 72 |
| 73 // firstMeaningfulPaintCandidate indicates the first time we considered a | 73 // firstMeaningfulPaintCandidate indicates the first time we considered a |
| 74 // paint to qualify as the potentially first meaningful paint. Unlike | 74 // paint to qualify as the potentially first meaningful paint. Unlike |
| 75 // firstMeaningfulPaint, this signal is available in real time, but it may be | 75 // firstMeaningfulPaint, this signal is available in real time, but it may be |
| 76 // an optimistic (i.e., too early) estimate. | 76 // an optimistic (i.e., too early) estimate. |
| 77 double firstMeaningfulPaintCandidate() const { | 77 double firstMeaningfulPaintCandidate() const { |
| 78 return m_firstMeaningfulPaintCandidate; | 78 return m_firstMeaningfulPaintCandidate; |
| 79 } | 79 } |
| 80 | 80 |
| 81 Document* document() { return m_document.get(); } | |
| 82 FirstMeaningfulPaintDetector& firstMeaningfulPaintDetector() { | 81 FirstMeaningfulPaintDetector& firstMeaningfulPaintDetector() { |
| 83 return *m_fmpDetector; | 82 return *m_fmpDetector; |
| 84 } | 83 } |
| 85 | 84 |
| 86 DECLARE_VIRTUAL_TRACE(); | 85 DECLARE_VIRTUAL_TRACE(); |
| 87 | 86 |
| 88 private: | 87 private: |
| 89 explicit PaintTiming(Document&); | 88 explicit PaintTiming(Document&); |
| 90 LocalFrame* frame() const; | 89 LocalFrame* frame() const; |
| 91 void notifyPaintTimingChanged(); | 90 void notifyPaintTimingChanged(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 102 // time has not yet been recorded. | 101 // time has not yet been recorded. |
| 103 void setFirstContentfulPaint(double stamp); | 102 void setFirstContentfulPaint(double stamp); |
| 104 | 103 |
| 105 double m_firstPaint = 0.0; | 104 double m_firstPaint = 0.0; |
| 106 double m_firstTextPaint = 0.0; | 105 double m_firstTextPaint = 0.0; |
| 107 double m_firstImagePaint = 0.0; | 106 double m_firstImagePaint = 0.0; |
| 108 double m_firstContentfulPaint = 0.0; | 107 double m_firstContentfulPaint = 0.0; |
| 109 double m_firstMeaningfulPaint = 0.0; | 108 double m_firstMeaningfulPaint = 0.0; |
| 110 double m_firstMeaningfulPaintCandidate = 0.0; | 109 double m_firstMeaningfulPaintCandidate = 0.0; |
| 111 | 110 |
| 112 Member<Document> m_document; | |
| 113 Member<FirstMeaningfulPaintDetector> m_fmpDetector; | 111 Member<FirstMeaningfulPaintDetector> m_fmpDetector; |
| 114 }; | 112 }; |
| 115 | 113 |
| 116 } // namespace blink | 114 } // namespace blink |
| 117 | 115 |
| 118 #endif | 116 #endif |
| OLD | NEW |