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

Side by Side Diff: mojo/services/tracing/public/cpp/tracing_impl.h

Issue 1459453003: mandoline: write this after lunch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TracingImpls to mus and mash, fix naming. Created 5 years, 1 month 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_SERVICES_TRACING_PUBLIC_CPP_TRACING_IMPL_H_ 5 #ifndef MOJO_SERVICES_TRACING_PUBLIC_CPP_TRACING_IMPL_H_
6 #define MOJO_SERVICES_TRACING_PUBLIC_CPP_TRACING_IMPL_H_ 6 #define MOJO_SERVICES_TRACING_PUBLIC_CPP_TRACING_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/application/public/cpp/interface_factory.h" 9 #include "mojo/application/public/cpp/interface_factory.h"
10 #include "mojo/services/tracing/public/cpp/trace_provider_impl.h" 10 #include "mojo/services/tracing/public/cpp/trace_provider_impl.h"
11 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" 11 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 14
15 class ApplicationConnection; 15 class ApplicationConnection;
16 class ApplicationImpl; 16 class ApplicationImpl;
17 17
18 // Connects to mojo:tracing during your Application's Initialize() call once
19 // per process.
20 //
21 // We need to deal with multiple ways of packaging mojo applications
22 // together. We'll need to deal with packages that use the mojo.ContentHandler
23 // interface to bundle several Applciations into a single physical on disk
24 // mojo binary, and with those same services each in their own mojo binary.
25 //
26 // Have your bundle ContentHandler own a TracingImpl, and each Application own
27 // a TracingImpl. In bundles, the second TracingImpl will be a no-op.
18 class TracingImpl : public InterfaceFactory<tracing::TraceProvider> { 28 class TracingImpl : public InterfaceFactory<tracing::TraceProvider> {
19 public: 29 public:
20 TracingImpl(); 30 TracingImpl();
21 ~TracingImpl() override; 31 ~TracingImpl() override;
22 32
23 // This connects to the tracing service and registers ourselves to provide 33 // This connects to the tracing service and registers ourselves to provide
24 // tracing data on demand. 34 // tracing data on demand.
25 void Initialize(ApplicationImpl* app); 35 void Initialize(ApplicationImpl* app);
26 36
27 private: 37 private:
28 // InterfaceFactory<tracing::TraceProvider> implementation. 38 // InterfaceFactory<tracing::TraceProvider> implementation.
29 void Create(ApplicationConnection* connection, 39 void Create(ApplicationConnection* connection,
30 InterfaceRequest<tracing::TraceProvider> request) override; 40 InterfaceRequest<tracing::TraceProvider> request) override;
31 41
32 scoped_ptr<ApplicationConnection> connection_; 42 scoped_ptr<ApplicationConnection> connection_;
33 TraceProviderImpl provider_impl_; 43 TraceProviderImpl provider_impl_;
34 44
35 DISALLOW_COPY_AND_ASSIGN(TracingImpl); 45 DISALLOW_COPY_AND_ASSIGN(TracingImpl);
36 }; 46 };
37 47
38 } // namespace mojo 48 } // namespace mojo
39 49
40 #endif // MOJO_SERVICES_TRACING_PUBLIC_CPP_TRACING_IMPL_H_ 50 #endif // MOJO_SERVICES_TRACING_PUBLIC_CPP_TRACING_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/network/network_service_delegate.cc ('k') | mojo/services/tracing/public/cpp/tracing_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698