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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceBase.h

Issue 2528513003: first-paint and first-contentful paint (Closed)
Patch Set: updated PerformanceEntryType size 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 20 matching lines...) Expand all
31 31
32 #ifndef PerformanceBase_h 32 #ifndef PerformanceBase_h
33 #define PerformanceBase_h 33 #define PerformanceBase_h
34 34
35 #include "core/CoreExport.h" 35 #include "core/CoreExport.h"
36 #include "core/dom/DOMHighResTimeStamp.h" 36 #include "core/dom/DOMHighResTimeStamp.h"
37 #include "core/events/EventTarget.h" 37 #include "core/events/EventTarget.h"
38 #include "core/loader/FrameLoaderTypes.h" 38 #include "core/loader/FrameLoaderTypes.h"
39 #include "core/timing/PerformanceEntry.h" 39 #include "core/timing/PerformanceEntry.h"
40 #include "core/timing/PerformanceNavigationTiming.h" 40 #include "core/timing/PerformanceNavigationTiming.h"
41 #include "core/timing/PerformancePaintTiming.h"
41 #include "platform/Timer.h" 42 #include "platform/Timer.h"
42 #include "platform/heap/Handle.h" 43 #include "platform/heap/Handle.h"
43 #include "wtf/Forward.h" 44 #include "wtf/Forward.h"
44 #include "wtf/HashSet.h" 45 #include "wtf/HashSet.h"
45 #include "wtf/ListHashSet.h" 46 #include "wtf/ListHashSet.h"
46 #include "wtf/Vector.h" 47 #include "wtf/Vector.h"
47 48
48 namespace blink { 49 namespace blink {
49 50
50 class ExceptionState; 51 class ExceptionState;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 double endTime, 104 double endTime,
104 const String& name, 105 const String& name,
105 const String& culpritFrameSrc, 106 const String& culpritFrameSrc,
106 const String& culpritFrameId, 107 const String& culpritFrameId,
107 const String& culpritFrameName); 108 const String& culpritFrameName);
108 109
109 void addResourceTiming(const ResourceTimingInfo&); 110 void addResourceTiming(const ResourceTimingInfo&);
110 111
111 void addNavigationTiming(LocalFrame*); 112 void addNavigationTiming(LocalFrame*);
112 113
114 void addFirstPaintTiming(double startTime);
115
116 void addFirstContentfulPaintTiming(double startTime);
117
113 void mark(const String& markName, ExceptionState&); 118 void mark(const String& markName, ExceptionState&);
114 void clearMarks(const String& markName); 119 void clearMarks(const String& markName);
115 120
116 void measure(const String& measureName, 121 void measure(const String& measureName,
117 const String& startMark, 122 const String& startMark,
118 const String& endMark, 123 const String& endMark,
119 ExceptionState&); 124 ExceptionState&);
120 void clearMeasures(const String& measureName); 125 void clearMeasures(const String& measureName);
121 126
122 void unregisterPerformanceObserver(PerformanceObserver&); 127 void unregisterPerformanceObserver(PerformanceObserver&);
(...skipping 12 matching lines...) Expand all
135 static bool allowsTimingRedirect(const Vector<ResourceResponse>&, 140 static bool allowsTimingRedirect(const Vector<ResourceResponse>&,
136 const ResourceResponse&, 141 const ResourceResponse&,
137 const SecurityOrigin&, 142 const SecurityOrigin&,
138 ExecutionContext*); 143 ExecutionContext*);
139 144
140 static bool passesTimingAllowCheck(const ResourceResponse&, 145 static bool passesTimingAllowCheck(const ResourceResponse&,
141 const SecurityOrigin&, 146 const SecurityOrigin&,
142 const AtomicString&, 147 const AtomicString&,
143 ExecutionContext*); 148 ExecutionContext*);
144 149
150 void addPaintTiming(PerformancePaintTiming::PaintType, double startTime);
151
145 protected: 152 protected:
146 explicit PerformanceBase(double timeOrigin); 153 explicit PerformanceBase(double timeOrigin);
147 154
148 bool isResourceTimingBufferFull(); 155 bool isResourceTimingBufferFull();
149 void addResourceTimingBuffer(PerformanceEntry&); 156 void addResourceTimingBuffer(PerformanceEntry&);
150 157
151 bool isFrameTimingBufferFull(); 158 bool isFrameTimingBufferFull();
152 void addFrameTimingBuffer(PerformanceEntry&); 159 void addFrameTimingBuffer(PerformanceEntry&);
153 160
154 void notifyObserversOfEntry(PerformanceEntry&); 161 void notifyObserversOfEntry(PerformanceEntry&);
(...skipping 13 matching lines...) Expand all
168 PerformanceEntryTypeMask m_observerFilterOptions; 175 PerformanceEntryTypeMask m_observerFilterOptions;
169 PerformanceObservers m_observers; 176 PerformanceObservers m_observers;
170 PerformanceObservers m_activeObservers; 177 PerformanceObservers m_activeObservers;
171 PerformanceObservers m_suspendedObservers; 178 PerformanceObservers m_suspendedObservers;
172 Timer<PerformanceBase> m_deliverObservationsTimer; 179 Timer<PerformanceBase> m_deliverObservationsTimer;
173 }; 180 };
174 181
175 } // namespace blink 182 } // namespace blink
176 183
177 #endif // PerformanceBase_h 184 #endif // PerformanceBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698