Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | |
|
yurys
2014/04/24 14:08:09
We normally use line comments (//) instead of bloc
| |
| 3 * Use of this source code is governed by a BSD-style license that can be | |
| 4 * found in the LICENSE file. | |
| 5 */ | |
| 6 | |
| 7 #ifndef InspectorTracingAgent_h | |
| 8 #define InspectorTracingAgent_h | |
| 9 | |
| 10 #include "InspectorFrontend.h" | |
| 11 #include "core/inspector/InspectorBaseAgent.h" | |
| 12 #include "wtf/PassOwnPtr.h" | |
| 13 #include "wtf/text/WTFString.h" | |
| 14 | |
| 15 namespace WebCore { | |
| 16 | |
| 17 class InspectorClient; | |
| 18 | |
| 19 class InspectorTracingAgent FINAL | |
| 20 : public InspectorBaseAgent<InspectorTracingAgent> | |
| 21 , public InspectorBackendDispatcher::TracingCommandHandler { | |
| 22 WTF_MAKE_NONCOPYABLE(InspectorTracingAgent); | |
| 23 public: | |
| 24 static PassOwnPtr<InspectorTracingAgent> create(InspectorClient* client) | |
| 25 { | |
| 26 return adoptPtr(new InspectorTracingAgent(client)); | |
| 27 } | |
| 28 | |
| 29 // Base agent methods. | |
| 30 virtual void restore() OVERRIDE; | |
| 31 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | |
| 32 virtual void clearFrontend() OVERRIDE; | |
| 33 | |
| 34 | |
| 35 // Protocol method implementations. | |
| 36 virtual void enable(ErrorString*, const String&) OVERRIDE; | |
| 37 virtual void disable(ErrorString*) OVERRIDE; | |
| 38 virtual void start(ErrorString*, const String&, const String&, const double* ) OVERRIDE; | |
| 39 | |
| 40 | |
| 41 // Methods for other agents to use. | |
| 42 void startFromBackend(); | |
| 43 void endFromBackend(); | |
| 44 void setLayerTreeId(int); | |
| 45 | |
| 46 private: | |
| 47 InspectorTracingAgent(InspectorClient*); | |
|
yurys
2014/04/24 14:08:09
explicit
| |
| 48 | |
| 49 void innerStart(); | |
| 50 void emitMetadataEvents(); | |
| 51 String sessionId(); | |
| 52 | |
| 53 InspectorFrontend::Tracing* m_frontend; | |
| 54 InspectorClient* m_client; | |
| 55 bool m_shouldStopTracing; | |
| 56 int m_layerTreeId; | |
| 57 }; | |
| 58 | |
| 59 } | |
| 60 | |
| 61 #endif // InspectorTracingAgent_h | |
| OLD | NEW |