Chromium Code Reviews| Index: Source/core/inspector/InspectorTracingAgent.h |
| diff --git a/Source/core/inspector/InspectorTracingAgent.h b/Source/core/inspector/InspectorTracingAgent.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..af49f916febd38ed6f6a807e30ff10a82ddca407 |
| --- /dev/null |
| +++ b/Source/core/inspector/InspectorTracingAgent.h |
| @@ -0,0 +1,61 @@ |
| +/* |
| + * Copyright 2014 The Chromium Authors. All rights reserved. |
|
yurys
2014/04/24 14:08:09
We normally use line comments (//) instead of bloc
|
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef InspectorTracingAgent_h |
| +#define InspectorTracingAgent_h |
| + |
| +#include "InspectorFrontend.h" |
| +#include "core/inspector/InspectorBaseAgent.h" |
| +#include "wtf/PassOwnPtr.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace WebCore { |
| + |
| +class InspectorClient; |
| + |
| +class InspectorTracingAgent FINAL |
| + : public InspectorBaseAgent<InspectorTracingAgent> |
| + , public InspectorBackendDispatcher::TracingCommandHandler { |
| + WTF_MAKE_NONCOPYABLE(InspectorTracingAgent); |
| +public: |
| + static PassOwnPtr<InspectorTracingAgent> create(InspectorClient* client) |
| + { |
| + return adoptPtr(new InspectorTracingAgent(client)); |
| + } |
| + |
| + // Base agent methods. |
| + virtual void restore() OVERRIDE; |
| + virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
| + virtual void clearFrontend() OVERRIDE; |
| + |
| + |
| + // Protocol method implementations. |
| + virtual void enable(ErrorString*, const String&) OVERRIDE; |
| + virtual void disable(ErrorString*) OVERRIDE; |
| + virtual void start(ErrorString*, const String&, const String&, const double*) OVERRIDE; |
| + |
| + |
| + // Methods for other agents to use. |
| + void startFromBackend(); |
| + void endFromBackend(); |
| + void setLayerTreeId(int); |
| + |
| +private: |
| + InspectorTracingAgent(InspectorClient*); |
|
yurys
2014/04/24 14:08:09
explicit
|
| + |
| + void innerStart(); |
| + void emitMetadataEvents(); |
| + String sessionId(); |
| + |
| + InspectorFrontend::Tracing* m_frontend; |
| + InspectorClient* m_client; |
| + bool m_shouldStopTracing; |
| + int m_layerTreeId; |
| +}; |
| + |
| +} |
| + |
| +#endif // InspectorTracingAgent_h |