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

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

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 TraceEventTarget<InspectorTimelineAgent> 92 : public InspectorBaseAgent<InspectorTimelineAgent>
93 , public InspectorBaseAgent<InspectorTimelineAgent>
94 , public ScriptGCEventListener 93 , public ScriptGCEventListener
95 , public InspectorBackendDispatcher::TimelineCommandHandler 94 , public InspectorBackendDispatcher::TimelineCommandHandler
96 , public PlatformInstrumentationClient { 95 , public PlatformInstrumentationClient {
97 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent); 96 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent);
98 public: 97 public:
99 enum InspectorType { PageInspector, WorkerInspector }; 98 enum InspectorType { PageInspector, WorkerInspector };
100 99
101 class GPUEvent { 100 class GPUEvent {
102 public: 101 public:
103 enum Phase { PhaseBegin, PhaseEnd }; 102 enum Phase { PhaseBegin, PhaseEnd };
104 GPUEvent(double timestamp, int phase, bool foreign, uint64_t usedGPUMemo ryBytes, uint64_t limitGPUMemoryBytes) : 103 GPUEvent(double timestamp, int phase, bool foreign, uint64_t usedGPUMemo ryBytes, uint64_t limitGPUMemoryBytes) :
105 timestamp(timestamp), 104 timestamp(timestamp),
106 phase(static_cast<Phase>(phase)), 105 phase(static_cast<Phase>(phase)),
107 foreign(foreign), 106 foreign(foreign),
108 usedGPUMemoryBytes(usedGPUMemoryBytes), 107 usedGPUMemoryBytes(usedGPUMemoryBytes),
109 limitGPUMemoryBytes(limitGPUMemoryBytes) { } 108 limitGPUMemoryBytes(limitGPUMemoryBytes) { }
110 double timestamp; 109 double timestamp;
111 Phase phase; 110 Phase phase;
112 bool foreign; 111 bool foreign;
113 uint64_t usedGPUMemoryBytes; 112 uint64_t usedGPUMemoryBytes;
114 uint64_t limitGPUMemoryBytes; 113 uint64_t limitGPUMemoryBytes;
115 }; 114 };
116 115
117 static PassOwnPtr<InspectorTimelineAgent> create(InspectorPageAgent* pageAge nt, InspectorLayerTreeAgent* layerTreeAgent, 116 static PassOwnPtrWillBeRawPtr<InspectorTimelineAgent> create(InspectorPageAg ent* pageAgent, InspectorLayerTreeAgent* layerTreeAgent,
118 InspectorOverlay* overlay, InspectorType type, InspectorClient* client) 117 InspectorOverlay* overlay, InspectorType type, InspectorClient* client)
119 { 118 {
120 return adoptPtr(new InspectorTimelineAgent(pageAgent, layerTreeAgent, ov erlay, type, client)); 119 return adoptPtrWillBeNoop(new InspectorTimelineAgent(pageAgent, layerTre eAgent, overlay, type, client));
121 } 120 }
122 121
123 virtual ~InspectorTimelineAgent(); 122 virtual ~InspectorTimelineAgent();
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
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 double timestamp(); 280 double timestamp();
281 281
282 LocalFrame* mainFrame() const; 282 LocalFrame* mainFrame() const;
283 283
284 bool isStarted(); 284 bool isStarted();
285 void innerStart(); 285 void innerStart();
286 void innerStop(bool fromConsole); 286 void innerStop(bool fromConsole);
287 void setLiveEvents(const String&); 287 void setLiveEvents(const String&);
288 288
289 InspectorPageAgent* m_pageAgent; 289 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
290 InspectorLayerTreeAgent* m_layerTreeAgent; 290 RawPtrWillBeMember<InspectorLayerTreeAgent> m_layerTreeAgent;
291 InspectorFrontend::Timeline* m_frontend; 291 InspectorFrontend::Timeline* m_frontend;
292 InspectorClient* m_client; 292 InspectorClient* m_client;
293 InspectorOverlay* m_overlay; 293 InspectorOverlay* m_overlay;
294 InspectorType m_inspectorType; 294 InspectorType m_inspectorType;
295 295
296 int m_id; 296 int m_id;
297 unsigned long long m_layerTreeId; 297 unsigned long long m_layerTreeId;
298 298
299 int m_maxCallStackDepth; 299 int m_maxCallStackDepth;
300 300
(...skipping 15 matching lines...) Expand all
316 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; 316 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap;
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)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorRuntimeAgent.h ('k') | Source/core/inspector/InspectorTimelineAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698