Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintTiming.h

Issue 2617103002: Use a new Supplement constructor for Supplement<Document> (Part 1) (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698