| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
| 14 #include "mojo/public/cpp/bindings/binding_set.h" | 14 #include "mojo/public/cpp/bindings/binding_set.h" |
| 15 #include "mojo/public/cpp/bindings/interface_ptr_set.h" | 15 #include "mojo/public/cpp/bindings/interface_ptr_set.h" |
| 16 #include "mojo/public/cpp/bindings/strong_binding.h" | 16 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 17 #include "services/shell/public/cpp/interface_factory.h" | 17 #include "services/shell/public/cpp/interface_factory.h" |
| 18 #include "services/shell/public/cpp/shell_client.h" | 18 #include "services/shell/public/cpp/service.h" |
| 19 #include "services/tracing/public/interfaces/tracing.mojom.h" | 19 #include "services/tracing/public/interfaces/tracing.mojom.h" |
| 20 #include "services/tracing/trace_data_sink.h" | 20 #include "services/tracing/trace_data_sink.h" |
| 21 #include "services/tracing/trace_recorder_impl.h" | 21 #include "services/tracing/trace_recorder_impl.h" |
| 22 | 22 |
| 23 namespace tracing { | 23 namespace tracing { |
| 24 | 24 |
| 25 class TracingApp | 25 class TracingApp |
| 26 : public shell::ShellClient, | 26 : public shell::Service, |
| 27 public shell::InterfaceFactory<TraceCollector>, | 27 public shell::InterfaceFactory<TraceCollector>, |
| 28 public TraceCollector, | 28 public TraceCollector, |
| 29 public shell::InterfaceFactory<StartupPerformanceDataCollector>, | 29 public shell::InterfaceFactory<StartupPerformanceDataCollector>, |
| 30 public StartupPerformanceDataCollector { | 30 public StartupPerformanceDataCollector { |
| 31 public: | 31 public: |
| 32 TracingApp(); | 32 TracingApp(); |
| 33 ~TracingApp() override; | 33 ~TracingApp() override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // shell::ShellClient implementation. | 36 // shell::Service implementation. |
| 37 bool AcceptConnection(shell::Connection* connection) override; | 37 bool OnConnect(shell::Connection* connection) override; |
| 38 bool ShellConnectionLost() override; | 38 bool OnStop() override; |
| 39 | 39 |
| 40 // shell::InterfaceFactory<TraceCollector> implementation. | 40 // shell::InterfaceFactory<TraceCollector> implementation. |
| 41 void Create(shell::Connection* connection, | 41 void Create(shell::Connection* connection, |
| 42 mojo::InterfaceRequest<TraceCollector> request) override; | 42 mojo::InterfaceRequest<TraceCollector> request) override; |
| 43 | 43 |
| 44 // shell::InterfaceFactory<StartupPerformanceDataCollector> implementation. | 44 // shell::InterfaceFactory<StartupPerformanceDataCollector> implementation. |
| 45 void Create( | 45 void Create( |
| 46 shell::Connection* connection, | 46 shell::Connection* connection, |
| 47 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) override; | 47 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) override; |
| 48 | 48 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 73 StartupPerformanceTimes startup_performance_times_; | 73 StartupPerformanceTimes startup_performance_times_; |
| 74 bool tracing_active_; | 74 bool tracing_active_; |
| 75 mojo::String tracing_categories_; | 75 mojo::String tracing_categories_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(TracingApp); | 77 DISALLOW_COPY_AND_ASSIGN(TracingApp); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace tracing | 80 } // namespace tracing |
| 81 | 81 |
| 82 #endif // SERVICES_TRACING_TRACING_APP_H_ | 82 #endif // SERVICES_TRACING_TRACING_APP_H_ |
| OLD | NEW |