#include "content/web_test/renderer/web_test_content_renderer_client.h"
#include <string>
#include <utility>
#include "base/command_line.h"
#include "base/debug/debugger.h"
#include "base/functional/callback.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/shell/common/shell_switches.h"
#include "content/shell/renderer/shell_render_frame_observer.h"
#include "content/web_test/common/web_test_switches.h"
#include "content/web_test/renderer/blink_test_helpers.h"
#include "content/web_test/renderer/test_runner.h"
#include "content/web_test/renderer/test_websocket_handshake_throttle_provider.h"
#include "content/web_test/renderer/web_frame_test_proxy.h"
#include "media/base/audio_latency.h"
#include "media/base/mime_util.h"
#include "media/media_buildflags.h"
#include "third_party/blink/public/common/unique_name/unique_name_helper.h"
#include "third_party/blink/public/platform/web_audio_latency_hint.h"
#include "third_party/blink/public/platform/web_dedicated_or_shared_worker_fetch_context.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
#include "third_party/blink/public/test/frame_widget_test_helper.h"
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_plugin_params.h"
#include "third_party/blink/public/web/web_testing_support.h"
#include "ui/gfx/icc_profile.h"
#include "v8/include/v8.h"
#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE)
#include "skia/ext/test_fonts.h"
#endif
namespace content {
namespace {
static WebTestContentRendererClient* g_client = …;
RenderFrameImpl* CreateWebFrameTestProxy(RenderFrameImpl::CreateParams params) { … }
blink::WebFrameWidget* CreateWebTestWebFrameWidget(
base::PassKey<blink::WebLocalFrame> pass_key,
blink::CrossVariantMojoAssociatedRemote<
blink::mojom::FrameWidgetHostInterfaceBase> frame_widget_host,
blink::CrossVariantMojoAssociatedReceiver<
blink::mojom::FrameWidgetInterfaceBase> frame_widget,
blink::CrossVariantMojoAssociatedRemote<
blink::mojom::WidgetHostInterfaceBase> widget_host,
blink::CrossVariantMojoAssociatedReceiver<blink::mojom::WidgetInterfaceBase>
widget,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const viz::FrameSinkId& frame_sink_id,
bool hidden,
bool never_composited,
bool is_for_child_local_root,
bool is_for_nested_main_frame,
bool is_for_scalable_page) { … }
}
WebTestContentRendererClient::WebTestContentRendererClient() { … }
WebTestContentRendererClient::~WebTestContentRendererClient() { … }
void WebTestContentRendererClient::RenderThreadStarted() { … }
void WebTestContentRendererClient::RenderFrameCreated(
RenderFrame* render_frame) { … }
std::unique_ptr<blink::WebSocketHandshakeThrottleProvider>
WebTestContentRendererClient::CreateWebSocketHandshakeThrottleProvider() { … }
void WebTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) { … }
void WebTestContentRendererClient::
SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() { … }
bool WebTestContentRendererClient::IsIdleMediaSuspendEnabled() { … }
}