Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: mojo/common/tracing_impl.h

Issue 1334213002: Support for tracing app initialization. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Change BindingSet to Binding Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/public/cpp/application/interface_factory.h" 10 #include "mojo/public/cpp/application/interface_factory.h"
11 #include "mojo/public/cpp/bindings/binding.h"
10 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" 12 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
11 13
12 namespace mojo { 14 namespace mojo {
13 15
14 class ApplicationImpl; 16 class ApplicationImpl;
15 17
16 class TracingImpl : public InterfaceFactory<tracing::TraceProvider> { 18 class TracingImpl : public InterfaceFactory<tracing::TraceProvider> {
17 public: 19 public:
18 TracingImpl(); 20 TracingImpl();
19 ~TracingImpl() override; 21 ~TracingImpl() override;
20 22
21 // This connects to the tracing service and registers ourselves to provide 23 // This connects to the tracing service and registers ourselves to provide
22 // tracing data on demand. 24 // tracing data on demand.
23 void Initialize(ApplicationImpl* app); 25 void Initialize(ApplicationImpl* app);
24 26
25 private: 27 private:
26 // InterfaceFactory<tracing::TraceProvider> implementation. 28 // InterfaceFactory<tracing::TraceProvider> implementation.
27 void Create(ApplicationConnection* connection, 29 void Create(ApplicationConnection* connection,
28 InterfaceRequest<tracing::TraceProvider> request) override; 30 InterfaceRequest<tracing::TraceProvider> request) override;
29 31
32 TraceProviderImpl provider_impl_;
33 Binding<tracing::TraceProvider> binding_;
34
30 DISALLOW_COPY_AND_ASSIGN(TracingImpl); 35 DISALLOW_COPY_AND_ASSIGN(TracingImpl);
31 }; 36 };
32 37
33 } // namespace mojo 38 } // namespace mojo
34 39
35 #endif // MOJO_COMMON_TRACING_IMPL_H_ 40 #endif // MOJO_COMMON_TRACING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698