// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_TRACING_PERFETTO_PRODUCER_HOST_H_ #define SERVICES_TRACING_PERFETTO_PRODUCER_HOST_H_ #include <memory> #include <string> #include <utility> #include <vector> #include "base/memory/raw_ptr.h" #include "base/memory/unsafe_shared_memory_region.h" #include "mojo/public/cpp/bindings/remote.h" #include "services/tracing/public/mojom/perfetto_service.mojom.h" #include "third_party/perfetto/include/perfetto/ext/tracing/core/producer.h" #include "third_party/perfetto/include/perfetto/ext/tracing/core/tracing_service.h" #include "third_party/perfetto/include/perfetto/tracing/core/forward_decls.h" namespace base { namespace tracing { class PerfettoTaskRunner; } // namespace tracing } // namespace base namespace tracing { // This class is the service-side part of the Perfetto Producer pair // and is responsible for registering any available DataSources // with Perfetto (like ChromeTracing) in OnConnect(). It will forward // control messages from Perfetto to its per-process ProducerClient // counterpart, like starting tracing with a specific shared memory buffer, // create/teardown instances of specific data sources, etc. // It's managed by PerfettoService which is responsible for // creating a ProducerHost when a ProducerClient registers itself // and connects them together. class ProducerHost : public tracing::mojom::ProducerHost, public perfetto::Producer { … }; } // namespace tracing #endif // SERVICES_TRACING_PERFETTO_PRODUCER_HOST_H_