#ifndef SERVICES_TRACING_PUBLIC_CPP_PERFETTO_PERFETTO_TRACED_PROCESS_H_
#define SERVICES_TRACING_PUBLIC_CPP_PERFETTO_PERFETTO_TRACED_PROCESS_H_
#include "base/component_export.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/no_destructor.h"
#include "base/sequence_checker.h"
#include "base/synchronization/lock.h"
#include "base/task/sequenced_task_runner.h"
#include "base/thread_annotations.h"
#include "base/trace_event/trace_event.h"
#include "base/tracing/perfetto_task_runner.h"
#include "services/tracing/public/cpp/perfetto/perfetto_tracing_backend.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/tracing.h"
#include "third_party/perfetto/include/perfetto/tracing/tracing_policy.h"
namespace base {
namespace trace_event {
class TraceConfig;
}
namespace tracing {
class PerfettoPlatform;
}
}
namespace tracing {
namespace mojom {
class TracingService;
}
class PerfettoProducer;
class ProducerClient;
class SystemProducer;
class COMPONENT_EXPORT(TRACING_CPP) PerfettoTracedProcess final
: public perfetto::TracingPolicy { … };
template <typename T>
PerfettoTracedProcess::DataSourceProxy<T>::DataSourceProxy(
PerfettoTracedProcess::DataSourceBase* data_source)
: … { … }
template <typename T>
PerfettoTracedProcess::DataSourceProxy<T>::DataSourceProxy(
raw_ptr<PerfettoTracedProcess::DataSourceBase>* data_source_ptr)
: … { … }
template <typename T>
PerfettoTracedProcess::DataSourceProxy<T>::~DataSourceProxy() = default;
template <typename T>
void PerfettoTracedProcess::DataSourceProxy<T>::OnSetup(
const perfetto::DataSourceBase::SetupArgs& args) { … }
template <typename T>
void PerfettoTracedProcess::DataSourceProxy<T>::OnStart(
const perfetto::DataSourceBase::StartArgs&) { … }
template <typename T>
void PerfettoTracedProcess::DataSourceProxy<T>::OnStop(
const perfetto::DataSourceBase::StopArgs& args) { … }
template <typename T>
void PerfettoTracedProcess::DataSourceProxy<T>::WillClearIncrementalState(
const base::perfetto_track_event::TrackEvent::ClearIncrementalStateArgs&
args) { … }
template <typename T>
bool PerfettoTracedProcess::DataSourceProxy<T>::CanAdoptStartupSession(
const perfetto::DataSourceConfig& startup_config,
const perfetto::DataSourceConfig& service_config) { … }
}
#endif