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

Unified Diff: mojo/common/trace_controller_impl.h

Issue 791493006: De-client tracing.TraceController interface (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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: 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..572cb05fdbc6cd6b13ac583be7d2a9b4b587b19b
--- /dev/null
+++ b/mojo/common/trace_controller_impl.h
@@ -0,0 +1,37 @@
+// Copyright 2015 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:
+ explicit TraceControllerImpl(
+ InterfaceRequest<tracing::TraceController> request);
+
+ ~TraceControllerImpl() override;
+
+ private:
+ // tracing::TraceController implementation:
+ 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_;
+};
viettrungluu 2015/02/02 21:22:44 nit: DISALLOW_COPY_AND_ASSIGN
+
+} // namespace mojo
+
+#endif // MOJO_COMMON_TRACING_CONTROLLER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698