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

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

Issue 2472583003: Navigation Timing Level 2 (Closed)
Patch Set: added TAO(timing-allow-origin) check and RA(redirect allow) check Created 4 years, 1 month 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 28 matching lines...) Expand all
39 #include "platform/Timer.h" 39 #include "platform/Timer.h"
40 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
41 #include "wtf/Forward.h" 41 #include "wtf/Forward.h"
42 #include "wtf/HashSet.h" 42 #include "wtf/HashSet.h"
43 #include "wtf/ListHashSet.h" 43 #include "wtf/ListHashSet.h"
44 #include "wtf/Vector.h" 44 #include "wtf/Vector.h"
45 45
46 namespace blink { 46 namespace blink {
47 47
48 class DOMWindow; 48 class DOMWindow;
49 class Document;
50 class DocumentLoader;
51 class DocumentLoadTiming;
52 class DocumentTiming;
Kunihiko Sakamoto 2016/11/10 03:31:49 Are these forward declarations necessary?
sunjian 2016/11/11 21:48:05 Done.
49 class ExceptionState; 53 class ExceptionState;
54 class LocalFrame;
50 class PerformanceObserver; 55 class PerformanceObserver;
51 class PerformanceTiming; 56 class PerformanceTiming;
52 class ResourceTimingInfo; 57 class ResourceTimingInfo;
53 class UserTiming; 58 class UserTiming;
54 59
55 using PerformanceEntryVector = HeapVector<Member<PerformanceEntry>>; 60 using PerformanceEntryVector = HeapVector<Member<PerformanceEntry>>;
56 using PerformanceObservers = HeapListHashSet<Member<PerformanceObserver>>; 61 using PerformanceObservers = HeapListHashSet<Member<PerformanceObserver>>;
57 62
58 class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData { 63 class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
59 public: 64 public:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 97
93 void clearFrameTimings(); 98 void clearFrameTimings();
94 void setFrameTimingBufferSize(unsigned); 99 void setFrameTimingBufferSize(unsigned);
95 100
96 DEFINE_ATTRIBUTE_EVENT_LISTENER(frametimingbufferfull); 101 DEFINE_ATTRIBUTE_EVENT_LISTENER(frametimingbufferfull);
97 102
98 void addLongTaskTiming(double, double, const String&, DOMWindow*); 103 void addLongTaskTiming(double, double, const String&, DOMWindow*);
99 104
100 void addResourceTiming(const ResourceTimingInfo&); 105 void addResourceTiming(const ResourceTimingInfo&);
101 106
107 void addNavigationTiming(LocalFrame*);
108
102 void mark(const String& markName, ExceptionState&); 109 void mark(const String& markName, ExceptionState&);
103 void clearMarks(const String& markName); 110 void clearMarks(const String& markName);
104 111
105 void measure(const String& measureName, 112 void measure(const String& measureName,
106 const String& startMark, 113 const String& startMark,
107 const String& endMark, 114 const String& endMark,
108 ExceptionState&); 115 ExceptionState&);
109 void clearMeasures(const String& measureName); 116 void clearMeasures(const String& measureName);
110 117
111 void unregisterPerformanceObserver(PerformanceObserver&); 118 void unregisterPerformanceObserver(PerformanceObserver&);
(...skipping 15 matching lines...) Expand all
127 134
128 void notifyObserversOfEntry(PerformanceEntry&); 135 void notifyObserversOfEntry(PerformanceEntry&);
129 bool hasObserverFor(PerformanceEntry::EntryType) const; 136 bool hasObserverFor(PerformanceEntry::EntryType) const;
130 137
131 void deliverObservationsTimerFired(TimerBase*); 138 void deliverObservationsTimerFired(TimerBase*);
132 139
133 PerformanceEntryVector m_frameTimingBuffer; 140 PerformanceEntryVector m_frameTimingBuffer;
134 unsigned m_frameTimingBufferSize; 141 unsigned m_frameTimingBufferSize;
135 PerformanceEntryVector m_resourceTimingBuffer; 142 PerformanceEntryVector m_resourceTimingBuffer;
136 unsigned m_resourceTimingBufferSize; 143 unsigned m_resourceTimingBufferSize;
144 Member<PerformanceEntry> m_navigationTiming;
137 Member<UserTiming> m_userTiming; 145 Member<UserTiming> m_userTiming;
138 146
139 double m_timeOrigin; 147 double m_timeOrigin;
140 148
141 PerformanceEntryTypeMask m_observerFilterOptions; 149 PerformanceEntryTypeMask m_observerFilterOptions;
142 PerformanceObservers m_observers; 150 PerformanceObservers m_observers;
143 PerformanceObservers m_activeObservers; 151 PerformanceObservers m_activeObservers;
144 PerformanceObservers m_suspendedObservers; 152 PerformanceObservers m_suspendedObservers;
145 Timer<PerformanceBase> m_deliverObservationsTimer; 153 Timer<PerformanceBase> m_deliverObservationsTimer;
146 }; 154 };
147 155
148 } // namespace blink 156 } // namespace blink
149 157
150 #endif // PerformanceBase_h 158 #endif // PerformanceBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698