#include "content/renderer/browser_exposed_renderer_interfaces.h"
#include <stdint.h>
#include <memory>
#include <utility>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_runner.h"
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "content/common/features.h"
#include "content/common/frame.mojom.h"
#include "content/public/common/content_client.h"
#include "content/public/common/resource_usage_reporter.mojom.h"
#include "content/public/common/resource_usage_reporter_type_converters.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/service_worker/embedded_worker_instance_client_impl.h"
#include "content/renderer/worker/shared_worker_factory_impl.h"
#include "content/services/auction_worklet/auction_worklet_service_impl.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-statistics.h"
namespace content {
namespace {
constexpr int kWaitForWorkersStatsTimeoutMS = …;
class ResourceUsageReporterImpl : public content::mojom::ResourceUsageReporter { … };
void CreateResourceUsageReporter(
base::WeakPtr<RenderThreadImpl> render_thread,
mojo::PendingReceiver<mojom::ResourceUsageReporter> receiver) { … }
void CreateEmbeddedWorkerWithRenderMainThread(
scoped_refptr<base::SingleThreadTaskRunner> initiator_task_runner,
base::WeakPtr<RenderThreadImpl> render_thread,
mojo::PendingReceiver<blink::mojom::EmbeddedWorkerInstanceClient>
receiver) { … }
void CreateEmbeddedWorker(
scoped_refptr<base::SingleThreadTaskRunner> initiator_task_runner,
mojo::PendingReceiver<blink::mojom::EmbeddedWorkerInstanceClient>
receiver) { … }
}
void ExposeRendererInterfacesToBrowser(
base::WeakPtr<RenderThreadImpl> render_thread,
mojo::BinderMap* binders) { … }
}