summaryrefslogtreecommitdiffstats
path: root/content/browser/devtools/devtools_tracing_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/devtools/devtools_tracing_handler.h')
-rw-r--r--content/browser/devtools/devtools_tracing_handler.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/content/browser/devtools/devtools_tracing_handler.h b/content/browser/devtools/devtools_tracing_handler.h
index 43cd615..b551e75 100644
--- a/content/browser/devtools/devtools_tracing_handler.h
+++ b/content/browser/devtools/devtools_tracing_handler.h
@@ -5,36 +5,36 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
-#include "base/debug/trace_event.h"
+#include "base/memory/weak_ptr.h"
#include "content/browser/devtools/devtools_protocol.h"
-#include "content/public/browser/trace_subscriber.h"
+#include "content/public/browser/tracing_controller.h"
+
+namespace base {
+class RefCountedString;
+}
namespace content {
// This class bridges DevTools remote debugging server with the trace
// infrastructure.
-class DevToolsTracingHandler
- : public TraceSubscriber,
- public DevToolsProtocol::Handler {
+class DevToolsTracingHandler : public DevToolsProtocol::Handler {
public:
DevToolsTracingHandler();
virtual ~DevToolsTracingHandler();
- // TraceSubscriber:
- virtual void OnEndTracingComplete() OVERRIDE;;
- virtual void OnTraceDataCollected(
- const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE;
-
private:
+ void BeginReadingRecordingResult(const base::FilePath& path);
+ void ReadRecordingResult(const scoped_refptr<base::RefCountedString>& result);
+ void OnTraceDataCollected(const std::string& trace_fragment);
+
scoped_refptr<DevToolsProtocol::Response> OnStart(
scoped_refptr<DevToolsProtocol::Command> command);
scoped_refptr<DevToolsProtocol::Response> OnEnd(
scoped_refptr<DevToolsProtocol::Command> command);
- base::debug::TraceLog::Options TraceOptionsFromString(
- const std::string& options);
+ TracingController::Options TraceOptionsFromString(const std::string& options);
- bool is_running_;
+ base::WeakPtrFactory<DevToolsTracingHandler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler);
};