Index: mojo/common/trace_controller_impl.h |
diff --git a/mojo/common/trace_controller_impl.h b/mojo/common/trace_controller_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..43c184673f95742f36a295369ffea8b809ac6897 |
--- /dev/null |
+++ b/mojo/common/trace_controller_impl.h |
@@ -0,0 +1,38 @@ |
+// 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 MOJO_COMMON_TRACING_CONTROLLER_IMPL_H_ |
+#define MOJO_COMMON_TRACING_CONTROLLER_IMPL_H_ |
+ |
+#include "base/memory/ref_counted_memory.h" |
+#include "mojo/public/cpp/bindings/interface_request.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
+#include "services/tracing/tracing.mojom.h" |
+ |
+namespace mojo { |
+ |
+class TraceControllerImpl : public tracing::TraceController { |
+ public: |
+ TraceControllerImpl(); |
+ |
+ ~TraceControllerImpl() override; |
+ |
+ void Bind(InterfaceRequest<tracing::TraceController> request); |
+ |
+ private: |
+ // Overridden from tracing::TraceController: |
+ void StartTracing(const String& categories, |
+ tracing::TraceDataCollectorPtr collector) override; |
+ void StopTracing() override; |
+ |
+ void SendChunk(const scoped_refptr<base::RefCountedString>& events_str, |
+ bool has_more_events); |
+ |
+ tracing::TraceDataCollectorPtr collector_; |
+ StrongBinding<tracing::TraceController> binding_; |
+}; |
+ |
+} // namespace mojo |
+ |
+#endif // MOJO_COMMON_TRACING_CONTROLLER_IMPL_H_ |