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

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

Issue 1118963002: Revert of DevTools: remove dependency of most agents on InspectorPageAgent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 InspectorPageAgent;
17 class InspectorWorkerAgent; 18 class InspectorWorkerAgent;
18 class LocalFrame;
19 19
20 class InspectorTracingAgent final 20 class InspectorTracingAgent final
21 : public InspectorBaseAgent<InspectorTracingAgent, InspectorFrontend::Tracin g> 21 : public InspectorBaseAgent<InspectorTracingAgent, InspectorFrontend::Tracin g>
22 , public InspectorBackendDispatcher::TracingCommandHandler { 22 , public InspectorBackendDispatcher::TracingCommandHandler {
23 WTF_MAKE_NONCOPYABLE(InspectorTracingAgent); 23 WTF_MAKE_NONCOPYABLE(InspectorTracingAgent);
24 public: 24 public:
25 class Client { 25 class Client {
26 public: 26 public:
27 virtual ~Client() { } 27 virtual ~Client() { }
28 28
29 virtual void enableTracing(const String& categoryFilter) { } 29 virtual void enableTracing(const String& categoryFilter) { }
30 virtual void disableTracing() { } 30 virtual void disableTracing() { }
31 }; 31 };
32 32
33 static PassOwnPtrWillBeRawPtr<InspectorTracingAgent> create(LocalFrame* insp ectedFrame, Client* client, InspectorWorkerAgent* workerAgent) 33 static PassOwnPtrWillBeRawPtr<InspectorTracingAgent> create(Client* client, InspectorWorkerAgent* workerAgent, InspectorPageAgent* pageAgent)
34 { 34 {
35 return adoptPtrWillBeNoop(new InspectorTracingAgent(inspectedFrame, clie nt, workerAgent)); 35 return adoptPtrWillBeNoop(new InspectorTracingAgent(client, workerAgent, pageAgent));
36 } 36 }
37 37
38 DECLARE_VIRTUAL_TRACE(); 38 DECLARE_VIRTUAL_TRACE();
39 39
40 // Base agent methods. 40 // Base agent methods.
41 void restore() override; 41 void restore() override;
42 void disable(ErrorString*) override; 42 void disable(ErrorString*) override;
43 43
44 // Protocol method implementations. 44 // Protocol method implementations.
45 virtual void start(ErrorString*, const String* categoryFilter, const String* , const double*, PassRefPtrWillBeRawPtr<StartCallback>) override; 45 virtual void start(ErrorString*, const String* categoryFilter, const String* , const double*, PassRefPtrWillBeRawPtr<StartCallback>) override;
46 virtual void end(ErrorString*, PassRefPtrWillBeRawPtr<EndCallback>); 46 virtual void end(ErrorString*, PassRefPtrWillBeRawPtr<EndCallback>);
47 47
48 // Methods for other agents to use. 48 // Methods for other agents to use.
49 void setLayerTreeId(int); 49 void setLayerTreeId(int);
50 50
51 private: 51 private:
52 InspectorTracingAgent(LocalFrame*, Client*, InspectorWorkerAgent*); 52 InspectorTracingAgent(Client*, InspectorWorkerAgent*, InspectorPageAgent*);
53 53
54 void emitMetadataEvents(); 54 void emitMetadataEvents();
55 void resetSessionId(); 55 void resetSessionId();
56 String sessionId(); 56 String sessionId();
57 57
58 RawPtrWillBeMember<LocalFrame> m_inspectedFrame;
59 int m_layerTreeId; 58 int m_layerTreeId;
60 Client* m_client; 59 Client* m_client;
61 RawPtrWillBeMember<InspectorWorkerAgent> m_workerAgent; 60 RawPtrWillBeMember<InspectorWorkerAgent> m_workerAgent;
61 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
62 }; 62 };
63 63
64 } // namespace blink 64 } // namespace blink
65 65
66 #endif // InspectorTracingAgent_h 66 #endif // InspectorTracingAgent_h
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/core/inspector/InspectorTracingAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698