| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SERVICES_TRACING_TRACING_APP_H_ | 5 #ifndef SERVICES_TRACING_TRACING_APP_H_ |
| 6 #define SERVICES_TRACING_TRACING_APP_H_ | 6 #define SERVICES_TRACING_TRACING_APP_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class TracingApp : public mojo::ApplicationDelegate, | 23 class TracingApp : public mojo::ApplicationDelegate, |
| 24 public TraceCollector, | 24 public TraceCollector, |
| 25 public TraceProviderRegistry { | 25 public TraceProviderRegistry { |
| 26 public: | 26 public: |
| 27 TracingApp(); | 27 TracingApp(); |
| 28 ~TracingApp() override; | 28 ~TracingApp() override; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // mojo::ApplicationDelegate implementation. | 31 // mojo::ApplicationDelegate implementation. |
| 32 bool ConfigureIncomingConnection( | 32 bool ConfigureIncomingConnection( |
| 33 mojo::ApplicationConnection* connection) override; | 33 mojo::ServiceProviderImpl* service_provider_impl) override; |
| 34 | 34 |
| 35 // TraceCollector implementation. | 35 // TraceCollector implementation. |
| 36 void Start(mojo::ScopedDataPipeProducerHandle stream, | 36 void Start(mojo::ScopedDataPipeProducerHandle stream, |
| 37 const mojo::String& categories) override; | 37 const mojo::String& categories) override; |
| 38 void StopAndFlush() override; | 38 void StopAndFlush() override; |
| 39 | 39 |
| 40 // TraceProviderRegistry implementation. | 40 // TraceProviderRegistry implementation. |
| 41 void RegisterTraceProvider( | 41 void RegisterTraceProvider( |
| 42 mojo::InterfaceHandle<TraceProvider> trace_provider) override; | 42 mojo::InterfaceHandle<TraceProvider> trace_provider) override; |
| 43 | 43 |
| 44 void AllDataCollected(); | 44 void AllDataCollected(); |
| 45 | 45 |
| 46 scoped_ptr<TraceDataSink> sink_; | 46 scoped_ptr<TraceDataSink> sink_; |
| 47 ScopedVector<TraceRecorderImpl> recorder_impls_; | 47 ScopedVector<TraceRecorderImpl> recorder_impls_; |
| 48 mojo::InterfacePtrSet<TraceProvider> provider_ptrs_; | 48 mojo::InterfacePtrSet<TraceProvider> provider_ptrs_; |
| 49 mojo::Binding<TraceCollector> collector_binding_; | 49 mojo::Binding<TraceCollector> collector_binding_; |
| 50 mojo::BindingSet<TraceProviderRegistry> provider_registry_bindings_; | 50 mojo::BindingSet<TraceProviderRegistry> provider_registry_bindings_; |
| 51 bool tracing_active_; | 51 bool tracing_active_; |
| 52 mojo::String tracing_categories_; | 52 mojo::String tracing_categories_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(TracingApp); | 54 DISALLOW_COPY_AND_ASSIGN(TracingApp); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace tracing | 57 } // namespace tracing |
| 58 | 58 |
| 59 #endif // SERVICES_TRACING_TRACING_APP_H_ | 59 #endif // SERVICES_TRACING_TRACING_APP_H_ |
| OLD | NEW |