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

Side by Side Diff: Source/core/inspector/InspectorTimelineAgent.h

Issue 135703002: Update inspector classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No change under web/ Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorState.h ('k') | Source/core/inspector/InspectorWorkerAgent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 : m_startOffset(0) 102 : m_startOffset(0)
103 { 103 {
104 } 104 }
105 double fromMonotonicallyIncreasingTime(double time) const { return (time - m_startOffset) * 1000.0; } 105 double fromMonotonicallyIncreasingTime(double time) const { return (time - m_startOffset) * 1000.0; }
106 void reset(); 106 void reset();
107 107
108 private: 108 private:
109 double m_startOffset; 109 double m_startOffset;
110 }; 110 };
111 111
112 class InspectorTimelineAgent 112 class InspectorTimelineAgent FINAL
113 : public TraceEventTarget<InspectorTimelineAgent> 113 : public TraceEventTarget<InspectorTimelineAgent>
114 , public InspectorBaseAgent<InspectorTimelineAgent> 114 , public InspectorBaseAgent<InspectorTimelineAgent>
115 , public ScriptGCEventListener 115 , public ScriptGCEventListener
116 , public InspectorBackendDispatcher::TimelineCommandHandler 116 , public InspectorBackendDispatcher::TimelineCommandHandler
117 , public PlatformInstrumentationClient { 117 , public PlatformInstrumentationClient {
118 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent); 118 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent);
119 public: 119 public:
120 enum InspectorType { PageInspector, WorkerInspector }; 120 enum InspectorType { PageInspector, WorkerInspector };
121 121
122 class GPUEvent { 122 class GPUEvent {
123 public: 123 public:
124 enum Phase { PhaseBegin, PhaseEnd }; 124 enum Phase { PhaseBegin, PhaseEnd };
125 GPUEvent(double timestamp, int phase, bool foreign, size_t usedGPUMemory Bytes) : 125 GPUEvent(double timestamp, int phase, bool foreign, size_t usedGPUMemory Bytes) :
126 timestamp(timestamp), 126 timestamp(timestamp),
127 phase(static_cast<Phase>(phase)), 127 phase(static_cast<Phase>(phase)),
128 foreign(foreign), 128 foreign(foreign),
129 usedGPUMemoryBytes(usedGPUMemoryBytes) { } 129 usedGPUMemoryBytes(usedGPUMemoryBytes) { }
130 double timestamp; 130 double timestamp;
131 Phase phase; 131 Phase phase;
132 bool foreign; 132 bool foreign;
133 size_t usedGPUMemoryBytes; 133 size_t usedGPUMemoryBytes;
134 }; 134 };
135 135
136 static PassOwnPtr<InspectorTimelineAgent> create(InstrumentingAgents* instru mentingAgents, InspectorPageAgent* pageAgent, InspectorDOMAgent* domAgent, Inspe ctorOverlay* overlay, InspectorCompositeState* state, InspectorType type, Inspec torClient* client) 136 static PassOwnPtr<InspectorTimelineAgent> create(InstrumentingAgents* instru mentingAgents, InspectorPageAgent* pageAgent, InspectorDOMAgent* domAgent, Inspe ctorOverlay* overlay, InspectorCompositeState* state, InspectorType type, Inspec torClient* client)
137 { 137 {
138 return adoptPtr(new InspectorTimelineAgent(instrumentingAgents, pageAgen t, domAgent, overlay, state, type, client)); 138 return adoptPtr(new InspectorTimelineAgent(instrumentingAgents, pageAgen t, domAgent, overlay, state, type, client));
139 } 139 }
140 140
141 ~InspectorTimelineAgent(); 141 virtual ~InspectorTimelineAgent();
142 142
143 virtual void setFrontend(InspectorFrontend*); 143 virtual void setFrontend(InspectorFrontend*) OVERRIDE;
144 virtual void clearFrontend(); 144 virtual void clearFrontend() OVERRIDE;
145 virtual void restore(); 145 virtual void restore() OVERRIDE;
146 146
147 virtual void enable(ErrorString*); 147 virtual void enable(ErrorString*) OVERRIDE;
148 virtual void disable(ErrorString*); 148 virtual void disable(ErrorString*) OVERRIDE;
149 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b ufferEvents, const bool* includeCounters, const bool* includeGPUEvents); 149 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b ufferEvents, const bool* includeCounters, const bool* includeGPUEvents) OVERRIDE ;
150 virtual void stop(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Timel ine::TimelineEvent> >& events); 150 virtual void stop(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Timel ine::TimelineEvent> >& events) OVERRIDE;
151 151
152 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; } 152 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; }
153 int id() const { return m_id; } 153 int id() const { return m_id; }
154 154
155 void didCommitLoad(); 155 void didCommitLoad();
156 156
157 // Methods called from WebCore. 157 // Methods called from WebCore.
158 bool willCallFunction(ExecutionContext*, const String& scriptName, int scrip tLine); 158 bool willCallFunction(ExecutionContext*, const String& scriptName, int scrip tLine);
159 void didCallFunction(); 159 void didCallFunction();
160 160
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void didProcessTask(); 232 void didProcessTask();
233 233
234 void didCreateWebSocket(Document*, unsigned long identifier, const KURL&, co nst String& protocol); 234 void didCreateWebSocket(Document*, unsigned long identifier, const KURL&, co nst String& protocol);
235 void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier, const WebSocketHandshakeRequest&); 235 void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier, const WebSocketHandshakeRequest&);
236 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie r, const WebSocketHandshakeResponse&); 236 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie r, const WebSocketHandshakeResponse&);
237 void didCloseWebSocket(Document*, unsigned long identifier); 237 void didCloseWebSocket(Document*, unsigned long identifier);
238 238
239 void processGPUEvent(const GPUEvent&); 239 void processGPUEvent(const GPUEvent&);
240 240
241 // ScriptGCEventListener methods. 241 // ScriptGCEventListener methods.
242 virtual void didGC(double, double, size_t); 242 virtual void didGC(double, double, size_t) OVERRIDE;
243 243
244 // PlatformInstrumentationClient methods. 244 // PlatformInstrumentationClient methods.
245 virtual void willDecodeImage(const String& imageType) OVERRIDE; 245 virtual void willDecodeImage(const String& imageType) OVERRIDE;
246 virtual void didDecodeImage() OVERRIDE; 246 virtual void didDecodeImage() OVERRIDE;
247 virtual void willResizeImage(bool shouldCache) OVERRIDE; 247 virtual void willResizeImage(bool shouldCache) OVERRIDE;
248 virtual void didResizeImage() OVERRIDE; 248 virtual void didResizeImage() OVERRIDE;
249 249
250 private: 250 private:
251 251
252 friend class TimelineRecordStack; 252 friend class TimelineRecordStack;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 RefPtr<JSONObject> m_gpuTask; 335 RefPtr<JSONObject> m_gpuTask;
336 unsigned m_styleRecalcElementCounter; 336 unsigned m_styleRecalcElementCounter;
337 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; 337 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap;
338 ThreadStateMap m_threadStates; 338 ThreadStateMap m_threadStates;
339 bool m_mayEmitFirstPaint; 339 bool m_mayEmitFirstPaint;
340 }; 340 };
341 341
342 } // namespace WebCore 342 } // namespace WebCore
343 343
344 #endif // !defined(InspectorTimelineAgent_h) 344 #endif // !defined(InspectorTimelineAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorState.h ('k') | Source/core/inspector/InspectorWorkerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698