| 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..018389cc4f5534e3f0a70a0e1899635730fedfe0
|
| --- /dev/null
|
| +++ b/Source/core/inspector/InspectorTracingAgent.h
|
| @@ -0,0 +1,61 @@
|
| +/*
|
| + * Copyright 2014 The Chromium Authors. All rights reserved.
|
| + * 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*, String* sessionId) OVERRIDE;
|
| +
|
| +
|
| + // Methods for other agents to use.
|
| + void startFromBackend();
|
| + void endFromBackend();
|
| + void setLayerTreeId(int);
|
| +
|
| +private:
|
| + explicit InspectorTracingAgent(InspectorClient*);
|
| +
|
| + void innerStart();
|
| + void emitMetadataEvents();
|
| + String sessionId();
|
| +
|
| + InspectorFrontend::Tracing* m_frontend;
|
| + InspectorClient* m_client;
|
| + bool m_shouldStopTracing;
|
| + int m_layerTreeId;
|
| +};
|
| +
|
| +}
|
| +
|
| +#endif // InspectorTracingAgent_h
|
|
|