| 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 Node; | 27 class Node; |
| 24 class RenderImage; | 28 class RenderImage; |
| 25 class RenderLayer; | 29 class RenderLayer; |
| 26 class RenderObject; | 30 class RenderObject; |
| 27 class ResourceRequest; | 31 class ResourceRequest; |
| 28 class ResourceResponse; | 32 class ResourceResponse; |
| 29 class ScriptCallStack; | 33 class ScriptCallStack; |
| 30 class ScriptSourceCode; | 34 class ScriptSourceCode; |
| 31 class StyleChangeReasonForTracing; | 35 class StyleChangeReasonForTracing; |
| 36 class TracedValue; |
| 32 class WorkerThread; | 37 class WorkerThread; |
| 33 class XMLHttpRequest; | 38 class XMLHttpRequest; |
| 34 | 39 |
| 35 class InspectorLayoutEvent { | 40 class InspectorLayoutEvent { |
| 36 public: | 41 public: |
| 37 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> beginData(FrameView*
); | 42 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> beginData(FrameView*
); |
| 38 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> endData(RenderObject
* rootForThisLayout); | 43 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> endData(RenderObject
* rootForThisLayout); |
| 39 }; | 44 }; |
| 40 | 45 |
| 41 class InspectorStyleRecalcInvalidationTrackingEvent { | 46 class InspectorStyleRecalcInvalidationTrackingEvent { |
| 42 public: | 47 public: |
| 43 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(Node*, const St
yleChangeReasonForTracing&); | 48 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(Node*, const St
yleChangeReasonForTracing&); |
| 44 }; | 49 }; |
| 45 | 50 |
| 51 class InspectorStyleInvalidatorInvalidateEvent { |
| 52 public: |
| 53 static const char ElementHasPendingInvalidationList[]; |
| 54 static const char InvalidateCustomPseudo[]; |
| 55 static const char InvalidationSetMatchedAttribute[]; |
| 56 static const char InvalidationSetMatchedClass[]; |
| 57 static const char InvalidationSetMatchedId[]; |
| 58 static const char InvalidationSetMatchedTagName[]; |
| 59 static const char PreventStyleSharingForParent[]; |
| 60 |
| 61 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(Element&, const
char* reason); |
| 62 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> selectorPart(Element
&, const char* reason, const String&); |
| 63 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> invalidationList(Ele
ment&, const WillBeHeapVector<RefPtrWillBeMember<DescendantInvalidationSet> >&); |
| 64 |
| 65 private: |
| 66 static PassRefPtr<TracedValue> fillCommonPart(Element&, const char* reason); |
| 67 }; |
| 68 |
| 69 #define TRACE_STYLE_INVALIDATOR_INVALIDATION(element, reason) \ |
| 70 TRACE_EVENT_INSTANT1( \ |
| 71 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), \ |
| 72 "StyleInvalidatorInvalidationTracking", \ |
| 73 "data", \ |
| 74 InspectorStyleInvalidatorInvalidateEvent::data((element), (InspectorStyl
eInvalidatorInvalidateEvent::reason))) |
| 75 |
| 76 #define TRACE_STYLE_INVALIDATOR_INVALIDATION_SELECTORPART(element, reason, singl
eSelectorPart) \ |
| 77 TRACE_EVENT_INSTANT1(
\ |
| 78 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"),
\ |
| 79 "StyleInvalidatorInvalidationTracking",
\ |
| 80 "data",
\ |
| 81 InspectorStyleInvalidatorInvalidateEvent::selectorPart((element), (Inspe
ctorStyleInvalidatorInvalidateEvent::reason), (singleSelectorPart))) |
| 82 |
| 46 class InspectorLayoutInvalidationTrackingEvent { | 83 class InspectorLayoutInvalidationTrackingEvent { |
| 47 public: | 84 public: |
| 48 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect*); | 85 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect*); |
| 49 }; | 86 }; |
| 50 | 87 |
| 51 class InspectorPaintInvalidationTrackingEvent { | 88 class InspectorPaintInvalidationTrackingEvent { |
| 52 public: | 89 public: |
| 53 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect* renderer, const RenderObject* paintContainer); | 90 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const RenderObj
ect* renderer, const RenderObject* paintContainer); |
| 54 }; | 91 }; |
| 55 | 92 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 225 |
| 189 class InspectorTracingSessionIdForWorkerEvent { | 226 class InspectorTracingSessionIdForWorkerEvent { |
| 190 public: | 227 public: |
| 191 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s
essionId, WorkerThread*); | 228 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s
essionId, WorkerThread*); |
| 192 }; | 229 }; |
| 193 | 230 |
| 194 } // namespace blink | 231 } // namespace blink |
| 195 | 232 |
| 196 | 233 |
| 197 #endif // !defined(InspectorTraceEvents_h) | 234 #endif // !defined(InspectorTraceEvents_h) |
| OLD | NEW |