OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_COMMON_TRACING_IMPL_H_ | 5 #ifndef MOJO_COMMON_TRACING_IMPL_H_ |
6 #define MOJO_COMMON_TRACING_IMPL_H_ | 6 #define MOJO_COMMON_TRACING_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "mojo/common/trace_provider_impl.h" | 9 #include "mojo/common/trace_provider_impl.h" |
10 #include "mojo/public/cpp/application/interface_factory.h" | |
11 #include "mojo/services/tracing/interfaces/tracing.mojom.h" | |
12 | 10 |
13 namespace mojo { | 11 namespace mojo { |
14 | 12 |
15 class ApplicationImpl; | 13 class ApplicationImpl; |
16 | 14 |
17 class TracingImpl : public InterfaceFactory<tracing::TraceProvider> { | 15 class TracingImpl { |
18 public: | 16 public: |
19 TracingImpl(); | 17 TracingImpl(); |
20 ~TracingImpl() override; | 18 ~TracingImpl(); |
21 | 19 |
22 // This connects to the tracing service and registers ourselves to provide | 20 // This connects to the tracing service and registers ourselves to provide |
23 // tracing data on demand. | 21 // tracing data on demand. |
24 void Initialize(ApplicationImpl* app); | 22 void Initialize(ApplicationImpl* app); |
25 | 23 |
26 private: | 24 private: |
27 // InterfaceFactory<tracing::TraceProvider> implementation. | |
28 void Create(ApplicationConnection* connection, | |
29 InterfaceRequest<tracing::TraceProvider> request) override; | |
30 | |
31 TraceProviderImpl provider_impl_; | 25 TraceProviderImpl provider_impl_; |
32 | 26 |
33 DISALLOW_COPY_AND_ASSIGN(TracingImpl); | 27 DISALLOW_COPY_AND_ASSIGN(TracingImpl); |
34 }; | 28 }; |
35 | 29 |
36 } // namespace mojo | 30 } // namespace mojo |
37 | 31 |
38 #endif // MOJO_COMMON_TRACING_IMPL_H_ | 32 #endif // MOJO_COMMON_TRACING_IMPL_H_ |
OLD | NEW |