OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 class ResourceResponse; | 81 class ResourceResponse; |
82 class ScriptArguments; | 82 class ScriptArguments; |
83 class ScriptCallStack; | 83 class ScriptCallStack; |
84 class TimelineRecordStack; | 84 class TimelineRecordStack; |
85 class WebSocketHandshakeRequest; | 85 class WebSocketHandshakeRequest; |
86 class WebSocketHandshakeResponse; | 86 class WebSocketHandshakeResponse; |
87 class XMLHttpRequest; | 87 class XMLHttpRequest; |
88 | 88 |
89 typedef String ErrorString; | 89 typedef String ErrorString; |
90 | 90 |
91 class InspectorTimelineAgent FINAL | 91 class InspectorTimelineAgent final |
92 : public InspectorBaseAgent<InspectorTimelineAgent> | 92 : public InspectorBaseAgent<InspectorTimelineAgent> |
93 , public ScriptGCEventListener | 93 , public ScriptGCEventListener |
94 , public InspectorBackendDispatcher::TimelineCommandHandler | 94 , public InspectorBackendDispatcher::TimelineCommandHandler |
95 , public PlatformInstrumentationClient { | 95 , public PlatformInstrumentationClient { |
96 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent); | 96 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent); |
97 public: | 97 public: |
98 enum InspectorType { PageInspector, WorkerInspector }; | 98 enum InspectorType { PageInspector, WorkerInspector }; |
99 | 99 |
100 class GPUEvent { | 100 class GPUEvent { |
101 public: | 101 public: |
(...skipping 11 matching lines...) Expand all Loading... |
113 uint64_t limitGPUMemoryBytes; | 113 uint64_t limitGPUMemoryBytes; |
114 }; | 114 }; |
115 | 115 |
116 static PassOwnPtrWillBeRawPtr<InspectorTimelineAgent> create(InspectorPageAg
ent* pageAgent, InspectorLayerTreeAgent* layerTreeAgent, | 116 static PassOwnPtrWillBeRawPtr<InspectorTimelineAgent> create(InspectorPageAg
ent* pageAgent, InspectorLayerTreeAgent* layerTreeAgent, |
117 InspectorOverlay* overlay, InspectorType type, InspectorClient* client) | 117 InspectorOverlay* overlay, InspectorType type, InspectorClient* client) |
118 { | 118 { |
119 return adoptPtrWillBeNoop(new InspectorTimelineAgent(pageAgent, layerTre
eAgent, overlay, type, client)); | 119 return adoptPtrWillBeNoop(new InspectorTimelineAgent(pageAgent, layerTre
eAgent, overlay, type, client)); |
120 } | 120 } |
121 | 121 |
122 virtual ~InspectorTimelineAgent(); | 122 virtual ~InspectorTimelineAgent(); |
123 virtual void trace(Visitor*) OVERRIDE; | 123 virtual void trace(Visitor*) override; |
124 | 124 |
125 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 125 virtual void setFrontend(InspectorFrontend*) override; |
126 virtual void clearFrontend() OVERRIDE; | 126 virtual void clearFrontend() override; |
127 virtual void restore() OVERRIDE; | 127 virtual void restore() override; |
128 | 128 |
129 virtual void enable(ErrorString*) OVERRIDE; | 129 virtual void enable(ErrorString*) override; |
130 virtual void disable(ErrorString*) OVERRIDE; | 130 virtual void disable(ErrorString*) override; |
131 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b
ufferEvents, const String* liveEvents, const bool* includeCounters, const bool*
includeGPUEvents) OVERRIDE; | 131 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b
ufferEvents, const String* liveEvents, const bool* includeCounters, const bool*
includeGPUEvents) override; |
132 virtual void stop(ErrorString*) OVERRIDE; | 132 virtual void stop(ErrorString*) override; |
133 | 133 |
134 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; } | 134 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; } |
135 int id() const { return m_id; } | 135 int id() const { return m_id; } |
136 | 136 |
137 void didCommitLoad(); | 137 void didCommitLoad(); |
138 | 138 |
139 // Methods called from WebCore. | 139 // Methods called from WebCore. |
140 bool willCallFunction(ExecutionContext*, int scriptId, const String& scriptN
ame, int scriptLine); | 140 bool willCallFunction(ExecutionContext*, int scriptId, const String& scriptN
ame, int scriptLine); |
141 void didCallFunction(); | 141 void didCallFunction(); |
142 | 142 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 void didProcessTask(); | 212 void didProcessTask(); |
213 | 213 |
214 void didCreateWebSocket(Document*, unsigned long identifier, const KURL&, co
nst String& protocol); | 214 void didCreateWebSocket(Document*, unsigned long identifier, const KURL&, co
nst String& protocol); |
215 void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier,
const WebSocketHandshakeRequest*); | 215 void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier,
const WebSocketHandshakeRequest*); |
216 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie
r, const WebSocketHandshakeRequest*, const WebSocketHandshakeResponse*); | 216 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie
r, const WebSocketHandshakeRequest*, const WebSocketHandshakeResponse*); |
217 void didCloseWebSocket(Document*, unsigned long identifier); | 217 void didCloseWebSocket(Document*, unsigned long identifier); |
218 | 218 |
219 void processGPUEvent(const GPUEvent&); | 219 void processGPUEvent(const GPUEvent&); |
220 | 220 |
221 // ScriptGCEventListener methods. | 221 // ScriptGCEventListener methods. |
222 virtual void didGC(double, double, size_t) OVERRIDE; | 222 virtual void didGC(double, double, size_t) override; |
223 | 223 |
224 // PlatformInstrumentationClient methods. | 224 // PlatformInstrumentationClient methods. |
225 virtual void willDecodeImage(const String& imageType) OVERRIDE; | 225 virtual void willDecodeImage(const String& imageType) override; |
226 virtual void didDecodeImage() OVERRIDE; | 226 virtual void didDecodeImage() override; |
227 virtual void willResizeImage(bool shouldCache) OVERRIDE; | 227 virtual void willResizeImage(bool shouldCache) override; |
228 virtual void didResizeImage() OVERRIDE; | 228 virtual void didResizeImage() override; |
229 | 229 |
230 private: | 230 private: |
231 | 231 |
232 friend class TimelineRecordStack; | 232 friend class TimelineRecordStack; |
233 | 233 |
234 InspectorTimelineAgent(InspectorPageAgent*, InspectorLayerTreeAgent*, Inspec
torOverlay*, InspectorType, InspectorClient*); | 234 InspectorTimelineAgent(InspectorPageAgent*, InspectorLayerTreeAgent*, Inspec
torOverlay*, InspectorType, InspectorClient*); |
235 | 235 |
236 // Trace event handlers | 236 // Trace event handlers |
237 void onBeginImplSideFrame(const TraceEventDispatcher::TraceEvent&); | 237 void onBeginImplSideFrame(const TraceEventDispatcher::TraceEvent&); |
238 void onPaintSetupBegin(const TraceEventDispatcher::TraceEvent&); | 238 void onPaintSetupBegin(const TraceEventDispatcher::TraceEvent&); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 typedef WillBeHeapHashMap<ThreadIdentifier, TimelineThreadState> ThreadState
Map; | 316 typedef WillBeHeapHashMap<ThreadIdentifier, TimelineThreadState> ThreadState
Map; |
317 ThreadStateMap m_threadStates; | 317 ThreadStateMap m_threadStates; |
318 bool m_mayEmitFirstPaint; | 318 bool m_mayEmitFirstPaint; |
319 HashSet<String> m_liveEvents; | 319 HashSet<String> m_liveEvents; |
320 double m_lastProgressTimestamp; | 320 double m_lastProgressTimestamp; |
321 }; | 321 }; |
322 | 322 |
323 } // namespace blink | 323 } // namespace blink |
324 | 324 |
325 #endif // !defined(InspectorTimelineAgent_h) | 325 #endif // !defined(InspectorTimelineAgent_h) |
OLD | NEW |