Chromium Code Reviews| Index: services/tracing/collector_impl.h |
| diff --git a/services/tracing/collector_impl.h b/services/tracing/collector_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fe4b42767ef5bed3f5164265109a04adcea7c673 |
| --- /dev/null |
| +++ b/services/tracing/collector_impl.h |
| @@ -0,0 +1,36 @@ |
| +// 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 SERVICES_TRACING_COLLECTOR_IMPL_H_ |
| +#define SERVICES_TRACING_COLLECTOR_IMPL_H_ |
| + |
| +#include "mojo/public/cpp/bindings/binding.h" |
|
viettrungluu
2015/04/02 19:54:13
nit: include "base/macros.h"
|
| +#include "mojo/public/cpp/bindings/string.h" |
| +#include "services/tracing/trace_data_sink.h" |
| +#include "services/tracing/tracing.mojom.h" |
| + |
| +namespace tracing { |
| + |
| +class CollectorImpl : public TraceDataCollector { |
| + public: |
| + CollectorImpl(mojo::InterfaceRequest<TraceDataCollector> request, |
| + TraceDataSink* sink); |
| + ~CollectorImpl() override; |
| + |
| + void Read(); |
|
viettrungluu
2015/04/02 19:54:13
Could use some comments.
(E.g., what does Read()
jamesr
2015/04/06 22:31:04
Renamed to TryRead() and added comment
|
| + mojo::Handle RawHandleValue() const; |
| + |
| + private: |
| + // tracing::TraceDataCollector implementation. |
| + void DataCollected(const mojo::String& json) override; |
| + |
| + TraceDataSink* sink_; |
| + mojo::Binding<TraceDataCollector> binding_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(CollectorImpl); |
| +}; |
| + |
| +} // namespace tracing |
| + |
| +#endif // SERVICES_TRACING_COLLECTOR_IMPL_H_ |