#include "components/services/heap_profiling/heap_profiling_service.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/task/thread_pool.h"
#include "components/services/heap_profiling/connection_manager.h"
#include "components/services/heap_profiling/public/mojom/heap_profiling_client.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h"
namespace heap_profiling {
namespace {
class ProfilingServiceImpl;
class ProfilingServiceImpl
: public mojom::ProfilingService,
public memory_instrumentation::mojom::HeapProfiler { … };
void RunHeapProfilingService(
mojo::PendingReceiver<mojom::ProfilingService> receiver,
mojo::PendingReceiver<memory_instrumentation::mojom::HeapProfiler>
profiler_receiver,
mojo::PendingRemote<memory_instrumentation::mojom::HeapProfilerHelper>
helper) { … }
}
mojo::PendingRemote<mojom::ProfilingService> LaunchService(
mojo::PendingReceiver<memory_instrumentation::mojom::HeapProfiler>
profiler_receiver,
mojo::PendingRemote<memory_instrumentation::mojom::HeapProfilerHelper>
helper) { … }
}