OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 InspectorTraceEvents_h | 5 #ifndef InspectorTraceEvents_h |
6 #define InspectorTraceEvents_h | 6 #define InspectorTraceEvents_h |
7 | 7 |
8 #include "platform/EventTracer.h" | 8 #include "platform/EventTracer.h" |
9 #include "platform/TraceEvent.h" | 9 #include "platform/TraceEvent.h" |
| 10 #include "platform/heap/Handle.h" |
10 #include "wtf/Forward.h" | 11 #include "wtf/Forward.h" |
| 12 #include "wtf/Functional.h" |
11 | 13 |
12 namespace blink { | 14 namespace blink { |
13 | 15 |
| 16 class DescendantInvalidationSet; |
14 class Document; | 17 class Document; |
| 18 class Element; |
15 class Event; | 19 class Event; |
16 class ExecutionContext; | 20 class ExecutionContext; |
17 class FrameView; | 21 class FrameView; |
18 class GraphicsContext; | 22 class GraphicsContext; |
19 class GraphicsLayer; | 23 class GraphicsLayer; |
20 class KURL; | 24 class KURL; |
21 class LayoutRect; | 25 class LayoutRect; |
22 class LocalFrame; | 26 class LocalFrame; |
23 class RenderImage; | 27 class RenderImage; |
24 class RenderLayer; | 28 class RenderLayer; |
25 class RenderObject; | 29 class RenderObject; |
26 class ResourceRequest; | 30 class ResourceRequest; |
27 class ResourceResponse; | 31 class ResourceResponse; |
| 32 class ScriptCallStack; |
28 class ScriptSourceCode; | 33 class ScriptSourceCode; |
29 class ScriptCallStack; | 34 class TracedValue; |
30 class WorkerThread; | 35 class WorkerThread; |
31 class XMLHttpRequest; | 36 class XMLHttpRequest; |
32 | 37 |
33 class InspectorLayoutEvent { | 38 class InspectorLayoutEvent { |
34 public: | 39 public: |
35 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> beginData(FrameView*
); | 40 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> beginData(FrameView*
); |
36 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> endData(RenderObject
* rootForThisLayout); | 41 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> endData(RenderObject
* rootForThisLayout); |
37 }; | 42 }; |
38 | 43 |
| 44 class InspectorStyleInvalidatorInvalidateEvent { |
| 45 public: |
| 46 static const char ElementHasPendingInvalidationList[]; |
| 47 static const char InvalidateCustomPseudo[]; |
| 48 static const char InvalidationSetMatchedAttribute[]; |
| 49 static const char InvalidationSetMatchedClass[]; |
| 50 static const char InvalidationSetMatchedId[]; |
| 51 static const char InvalidationSetMatchedTagName[]; |
| 52 static const char PreventStyleSharingForParent[]; |
| 53 |
| 54 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(Element&, const
char* reason); |
| 55 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> selectorPart(Element
&, const char* reason, const String&); |
| 56 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> invalidationList(Ele
ment&, const WillBeHeapVector<RefPtrWillBeMember<DescendantInvalidationSet> >&); |
| 57 |
| 58 private: |
| 59 static PassRefPtr<TracedValue> fillCommonPart(Element&, const char* reason); |
| 60 }; |
| 61 |
| 62 #define TRACE_STYLE_INVALIDATOR_INVALIDATION(element, reason) \ |
| 63 TRACE_EVENT_INSTANT1( \ |
| 64 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), \ |
| 65 "StyleInvalidatorInvalidationTracking", \ |
| 66 "data", \ |
| 67 InspectorStyleInvalidatorInvalidateEvent::data((element), (InspectorStyl
eInvalidatorInvalidateEvent::reason))) |
| 68 |
| 69 #define TRACE_STYLE_INVALIDATOR_INVALIDATION_SELECTORPART(element, reason, singl
eSelectorPart) \ |
| 70 TRACE_EVENT_INSTANT1( \ |
| 71 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), \ |
| 72 "StyleInvalidatorInvalidationTracking", \ |
| 73 "data", \ |
| 74 InspectorStyleInvalidatorInvalidateEvent::selectorPart((element), (Inspe
ctorStyleInvalidatorInvalidateEvent::reason), (singleSelectorPart))) |
| 75 |
39 class InspectorLayoutInvalidationTrackingEvent { | 76 class InspectorLayoutInvalidationTrackingEvent { |
40 public: | 77 public: |
41 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect*); | 78 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect*); |
42 }; | 79 }; |
43 | 80 |
44 class InspectorPaintInvalidationTrackingEvent { | 81 class InspectorPaintInvalidationTrackingEvent { |
45 public: | 82 public: |
46 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect* renderer, const RenderObject* paintContainer); | 83 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect* renderer, const RenderObject* paintContainer); |
47 }; | 84 }; |
48 | 85 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 218 |
182 class InspectorTracingSessionIdForWorkerEvent { | 219 class InspectorTracingSessionIdForWorkerEvent { |
183 public: | 220 public: |
184 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s
essionId, WorkerThread*); | 221 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s
essionId, WorkerThread*); |
185 }; | 222 }; |
186 | 223 |
187 } // namespace blink | 224 } // namespace blink |
188 | 225 |
189 | 226 |
190 #endif // !defined(InspectorTraceEvents_h) | 227 #endif // !defined(InspectorTraceEvents_h) |
OLD | NEW |