OLD | NEW |
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 class InspectorWorkerAgent; |
19 | 19 |
20 class InspectorTracingAgent FINAL | 20 class InspectorTracingAgent final |
21 : public InspectorBaseAgent<InspectorTracingAgent> | 21 : public InspectorBaseAgent<InspectorTracingAgent> |
22 , public InspectorBackendDispatcher::TracingCommandHandler { | 22 , public InspectorBackendDispatcher::TracingCommandHandler { |
23 WTF_MAKE_NONCOPYABLE(InspectorTracingAgent); | 23 WTF_MAKE_NONCOPYABLE(InspectorTracingAgent); |
24 public: | 24 public: |
25 static PassOwnPtrWillBeRawPtr<InspectorTracingAgent> create(InspectorClient*
client, InspectorWorkerAgent* workerAgent) | 25 static PassOwnPtrWillBeRawPtr<InspectorTracingAgent> create(InspectorClient*
client, InspectorWorkerAgent* workerAgent) |
26 { | 26 { |
27 return adoptPtrWillBeNoop(new InspectorTracingAgent(client, workerAgent)
); | 27 return adoptPtrWillBeNoop(new InspectorTracingAgent(client, workerAgent)
); |
28 } | 28 } |
29 | 29 |
30 // Base agent methods. | 30 // Base agent methods. |
31 virtual void restore() OVERRIDE; | 31 virtual void restore() override; |
32 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 32 virtual void setFrontend(InspectorFrontend*) override; |
33 | 33 |
34 // Protocol method implementations. | 34 // Protocol method implementations. |
35 virtual void start(ErrorString*, const String& categoryFilter, const String&
, const double*, PassRefPtrWillBeRawPtr<StartCallback>) OVERRIDE; | 35 virtual void start(ErrorString*, const String& categoryFilter, const String&
, const double*, PassRefPtrWillBeRawPtr<StartCallback>) override; |
36 virtual void end(ErrorString*, PassRefPtrWillBeRawPtr<EndCallback>); | 36 virtual void end(ErrorString*, PassRefPtrWillBeRawPtr<EndCallback>); |
37 | 37 |
38 // Methods for other agents to use. | 38 // Methods for other agents to use. |
39 void setLayerTreeId(int); | 39 void setLayerTreeId(int); |
40 | 40 |
41 private: | 41 private: |
42 InspectorTracingAgent(InspectorClient*, InspectorWorkerAgent*); | 42 InspectorTracingAgent(InspectorClient*, InspectorWorkerAgent*); |
43 | 43 |
44 void emitMetadataEvents(); | 44 void emitMetadataEvents(); |
45 String sessionId(); | 45 String sessionId(); |
46 | 46 |
47 int m_layerTreeId; | 47 int m_layerTreeId; |
48 InspectorClient* m_client; | 48 InspectorClient* m_client; |
49 InspectorFrontend::Tracing* m_frontend; | 49 InspectorFrontend::Tracing* m_frontend; |
50 InspectorWorkerAgent* m_workerAgent; | 50 InspectorWorkerAgent* m_workerAgent; |
51 }; | 51 }; |
52 | 52 |
53 } | 53 } |
54 | 54 |
55 #endif // InspectorTracingAgent_h | 55 #endif // InspectorTracingAgent_h |
OLD | NEW |