#include "services/tracing/tracing_service.h"
#include <utility>
#include "base/functional/bind.h"
#include "build/build_config.h"
#include "services/tracing/perfetto/consumer_host.h"
#include "services/tracing/perfetto/perfetto_service.h"
#include "services/tracing/public/mojom/traced_process.mojom.h"
namespace tracing {
namespace {
void OnProcessConnectFailed(PerfettoService* perfetto_service, uint32_t pid) { … }
void OnProcessConnected(
PerfettoService* perfetto_service,
mojo::Remote<mojom::TracedProcess> traced_process,
uint32_t pid,
mojo::PendingReceiver<mojom::PerfettoService> service_receiver) { … }
}
TracingService::TracingService(PerfettoService* perfetto_service)
: … { … }
TracingService::TracingService(
mojo::PendingReceiver<mojom::TracingService> receiver)
: … { … }
TracingService::~TracingService() = default;
void TracingService::Initialize(std::vector<mojom::ClientInfoPtr> clients) { … }
void TracingService::AddClient(mojom::ClientInfoPtr client) { … }
#if !BUILDFLAG(IS_NACL) && BUILDFLAG(USE_BLINK)
void TracingService::BindConsumerHost(
mojo::PendingReceiver<mojom::ConsumerHost> receiver) { … }
#endif
}