| 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 17 matching lines...) Expand all Loading... |
| 28 public: | 28 public: |
| 29 TracingApp(); | 29 TracingApp(); |
| 30 ~TracingApp() override; | 30 ~TracingApp() override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 // mojo::ApplicationDelegate implementation. | 33 // mojo::ApplicationDelegate implementation. |
| 34 bool ConfigureIncomingConnection( | 34 bool ConfigureIncomingConnection( |
| 35 mojo::ApplicationConnection* connection) override; | 35 mojo::ApplicationConnection* connection) override; |
| 36 | 36 |
| 37 // mojo::InterfaceFactory<TraceCollector> implementation. | 37 // mojo::InterfaceFactory<TraceCollector> implementation. |
| 38 void Create(mojo::ApplicationConnection* connection, | 38 void Create(const mojo::ConnectionContext& connection_context, |
| 39 mojo::InterfaceRequest<TraceCollector> request) override; | 39 mojo::InterfaceRequest<TraceCollector> request) override; |
| 40 | 40 |
| 41 // mojo::InterfaceFactory<TraceProviderRegistry> implementation. | 41 // mojo::InterfaceFactory<TraceProviderRegistry> implementation. |
| 42 void Create(mojo::ApplicationConnection* connection, | 42 void Create(const mojo::ConnectionContext& connection_context, |
| 43 mojo::InterfaceRequest<TraceProviderRegistry> request) override; | 43 mojo::InterfaceRequest<TraceProviderRegistry> request) override; |
| 44 | 44 |
| 45 // TraceCollector implementation. | 45 // TraceCollector implementation. |
| 46 void Start(mojo::ScopedDataPipeProducerHandle stream, | 46 void Start(mojo::ScopedDataPipeProducerHandle stream, |
| 47 const mojo::String& categories) override; | 47 const mojo::String& categories) override; |
| 48 void StopAndFlush() override; | 48 void StopAndFlush() override; |
| 49 | 49 |
| 50 // TraceProviderRegistry implementation. | 50 // TraceProviderRegistry implementation. |
| 51 void RegisterTraceProvider( | 51 void RegisterTraceProvider( |
| 52 mojo::InterfaceHandle<TraceProvider> trace_provider) override; | 52 mojo::InterfaceHandle<TraceProvider> trace_provider) override; |
| 53 | 53 |
| 54 void AllDataCollected(); | 54 void AllDataCollected(); |
| 55 | 55 |
| 56 scoped_ptr<TraceDataSink> sink_; | 56 scoped_ptr<TraceDataSink> sink_; |
| 57 ScopedVector<TraceRecorderImpl> recorder_impls_; | 57 ScopedVector<TraceRecorderImpl> recorder_impls_; |
| 58 mojo::InterfacePtrSet<TraceProvider> provider_ptrs_; | 58 mojo::InterfacePtrSet<TraceProvider> provider_ptrs_; |
| 59 mojo::Binding<TraceCollector> collector_binding_; | 59 mojo::Binding<TraceCollector> collector_binding_; |
| 60 mojo::BindingSet<TraceProviderRegistry> provider_registry_bindings_; | 60 mojo::BindingSet<TraceProviderRegistry> provider_registry_bindings_; |
| 61 bool tracing_active_; | 61 bool tracing_active_; |
| 62 mojo::String tracing_categories_; | 62 mojo::String tracing_categories_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(TracingApp); | 64 DISALLOW_COPY_AND_ASSIGN(TracingApp); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace tracing | 67 } // namespace tracing |
| 68 | 68 |
| 69 #endif // SERVICES_TRACING_TRACING_APP_H_ | 69 #endif // SERVICES_TRACING_TRACING_APP_H_ |
| OLD | NEW |