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

Unified Diff: Source/core/inspector/InspectorTracingAgent.h

Issue 254613002: DevTools: add Tracing agent on back-end (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed obsolete code Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698