Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SERVICES_TRACING_COLLECTOR_IMPL_H_ | |
| 6 #define SERVICES_TRACING_COLLECTOR_IMPL_H_ | |
| 7 | |
| 8 #include "mojo/public/cpp/bindings/binding.h" | |
|
viettrungluu
2015/04/02 19:54:13
nit: include "base/macros.h"
| |
| 9 #include "mojo/public/cpp/bindings/string.h" | |
| 10 #include "services/tracing/trace_data_sink.h" | |
| 11 #include "services/tracing/tracing.mojom.h" | |
| 12 | |
| 13 namespace tracing { | |
| 14 | |
| 15 class CollectorImpl : public TraceDataCollector { | |
| 16 public: | |
| 17 CollectorImpl(mojo::InterfaceRequest<TraceDataCollector> request, | |
| 18 TraceDataSink* sink); | |
| 19 ~CollectorImpl() override; | |
| 20 | |
| 21 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
| |
| 22 mojo::Handle RawHandleValue() const; | |
| 23 | |
| 24 private: | |
| 25 // tracing::TraceDataCollector implementation. | |
| 26 void DataCollected(const mojo::String& json) override; | |
| 27 | |
| 28 TraceDataSink* sink_; | |
| 29 mojo::Binding<TraceDataCollector> binding_; | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(CollectorImpl); | |
| 32 }; | |
| 33 | |
| 34 } // namespace tracing | |
| 35 | |
| 36 #endif // SERVICES_TRACING_COLLECTOR_IMPL_H_ | |
| OLD | NEW |