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

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

Issue 460363002: Record DevTools metadata events on worker threads when starting recoring tracing based Timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef InspectorTracingAgent_h 7 #ifndef InspectorTracingAgent_h
8 #define InspectorTracingAgent_h 8 #define InspectorTracingAgent_h
9 9
10 #include "core/InspectorFrontend.h" 10 #include "core/InspectorFrontend.h"
11 #include "core/inspector/InspectorBaseAgent.h" 11 #include "core/inspector/InspectorBaseAgent.h"
12 #include "wtf/PassOwnPtr.h" 12 #include "wtf/PassOwnPtr.h"
13 #include "wtf/text/WTFString.h" 13 #include "wtf/text/WTFString.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class InspectorClient; 17 class InspectorClient;
18 class InspectorWorkerAgent;
18 19
19 class InspectorTracingAgent FINAL 20 class InspectorTracingAgent FINAL
20 : public InspectorBaseAgent<InspectorTracingAgent> 21 : public InspectorBaseAgent<InspectorTracingAgent>
21 , public InspectorBackendDispatcher::TracingCommandHandler { 22 , public InspectorBackendDispatcher::TracingCommandHandler {
22 WTF_MAKE_NONCOPYABLE(InspectorTracingAgent); 23 WTF_MAKE_NONCOPYABLE(InspectorTracingAgent);
23 public: 24 public:
24 static PassOwnPtrWillBeRawPtr<InspectorTracingAgent> create(InspectorClient* client) 25 static PassOwnPtrWillBeRawPtr<InspectorTracingAgent> create(InspectorClient* client, InspectorWorkerAgent* workerAgent)
25 { 26 {
26 return adoptPtrWillBeNoop(new InspectorTracingAgent(client)); 27 return adoptPtrWillBeNoop(new InspectorTracingAgent(client, workerAgent) );
27 } 28 }
28 29
29 // Base agent methods. 30 // Base agent methods.
30 virtual void restore() OVERRIDE; 31 virtual void restore() OVERRIDE;
31 virtual void setFrontend(InspectorFrontend*) OVERRIDE; 32 virtual void setFrontend(InspectorFrontend*) OVERRIDE;
32 33
33 void consoleTimeline(const String& title); 34 void consoleTimeline(const String& title);
34 void consoleTimelineEnd(const String& title); 35 void consoleTimelineEnd(const String& title);
35 36
36 // Protocol method implementations. 37 // Protocol method implementations.
37 virtual void start(ErrorString*, const String& categoryFilter, const String& , const double*) OVERRIDE; 38 virtual void start(ErrorString*, const String& categoryFilter, const String& , const double*) OVERRIDE;
38 virtual void end(ErrorString*); 39 virtual void end(ErrorString*);
39 40
40 // Methods for other agents to use. 41 // Methods for other agents to use.
41 void setLayerTreeId(int); 42 void setLayerTreeId(int);
42 43
43 private: 44 private:
44 explicit InspectorTracingAgent(InspectorClient*); 45 InspectorTracingAgent(InspectorClient*, InspectorWorkerAgent*);
45 46
46 void emitMetadataEvents(); 47 void emitMetadataEvents();
47 void innerStart(const String& categoryFilter, bool fromConsole); 48 void innerStart(const String& categoryFilter, bool fromConsole);
48 String sessionId(); 49 String sessionId();
50 void notifyTracingStopped();
49 51
50 int m_layerTreeId; 52 int m_layerTreeId;
51 InspectorClient* m_client; 53 InspectorClient* m_client;
52 Vector<String> m_consoleTimelines; 54 Vector<String> m_consoleTimelines;
53 InspectorFrontend::Tracing* m_frontend; 55 InspectorFrontend::Tracing* m_frontend;
56 InspectorWorkerAgent* m_workerAgent;
54 }; 57 };
55 58
56 } 59 }
57 60
58 #endif // InspectorTracingAgent_h 61 #endif // InspectorTracingAgent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698