#include "third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h"
#include <v8-inspector.h>
#include <memory>
#include <utility>
#include "base/auto_reset.h"
#include "base/unguessable_token.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_scoped_page_pauser.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_settings.h"
#include "third_party/blink/public/web/web_view_client.h"
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/core/core_initializer.h"
#include "third_party/blink/renderer/core/core_probe_sink.h"
#include "third_party/blink/renderer/core/events/web_input_event_conversion.h"
#include "third_party/blink/renderer/core/exported/web_settings_impl.h"
#include "third_party/blink/renderer/core/exported/web_view_impl.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/web_frame_widget_impl.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/inspector/dev_tools_emulator.h"
#include "third_party/blink/renderer/core/inspector/devtools_agent.h"
#include "third_party/blink/renderer/core/inspector/devtools_session.h"
#include "third_party/blink/renderer/core/inspector/inspected_frames.h"
#include "third_party/blink/renderer/core/inspector/inspector_animation_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_audits_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_css_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_dom_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_dom_snapshot_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_emulation_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_event_breakpoints_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_io_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_log_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_media_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_memory_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_network_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_overlay_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_page_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_performance_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_performance_timeline_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_preload_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_resource_container.h"
#include "third_party/blink/renderer/core/inspector/inspector_resource_content_loader.h"
#include "third_party/blink/renderer/core/inspector/inspector_task_runner.h"
#include "third_party/blink/renderer/core/inspector/main_thread_debugger.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
namespace {
bool IsMainFrame(WebLocalFrameImpl* frame) { … }
}
class ClientMessageLoopAdapter : public MainThreadDebugger::ClientMessageLoop { … };
ClientMessageLoopAdapter* ClientMessageLoopAdapter::instance_ = …;
void WebDevToolsAgentImpl::AttachSession(DevToolsSession* session,
bool restore) { … }
WebDevToolsAgentImpl* WebDevToolsAgentImpl::CreateForFrame(
WebLocalFrameImpl* frame) { … }
WebDevToolsAgentImpl::WebDevToolsAgentImpl(
WebLocalFrameImpl* web_local_frame_impl,
bool include_view_agents)
: … { … }
WebDevToolsAgentImpl::~WebDevToolsAgentImpl() { … }
void WebDevToolsAgentImpl::Trace(Visitor* visitor) const { … }
void WebDevToolsAgentImpl::WillBeDestroyed() { … }
void WebDevToolsAgentImpl::BindReceiver(
mojo::PendingAssociatedRemote<mojom::blink::DevToolsAgentHost> host_remote,
mojo::PendingAssociatedReceiver<mojom::blink::DevToolsAgent> receiver) { … }
void WebDevToolsAgentImpl::DetachSession(DevToolsSession* session) { … }
void WebDevToolsAgentImpl::InspectElement(
const gfx::Point& point_in_local_root) { … }
void WebDevToolsAgentImpl::DebuggerTaskStarted() { … }
void WebDevToolsAgentImpl::DebuggerTaskFinished() { … }
void WebDevToolsAgentImpl::DidCommitLoadForLocalFrame(LocalFrame* frame) { … }
bool WebDevToolsAgentImpl::ScreencastEnabled() { … }
void WebDevToolsAgentImpl::PageLayoutInvalidated(bool resized) { … }
void WebDevToolsAgentImpl::DidShowNewWindow() { … }
void WebDevToolsAgentImpl::WaitForDebuggerWhenShown() { … }
void WebDevToolsAgentImpl::WaitForDebugger() { … }
bool WebDevToolsAgentImpl::IsPausedForNewWindow() { … }
bool WebDevToolsAgentImpl::IsInspectorLayer(const cc::Layer* layer) { … }
String WebDevToolsAgentImpl::EvaluateInOverlayForTesting(const String& script) { … }
void WebDevToolsAgentImpl::UpdateOverlaysPrePaint() { … }
void WebDevToolsAgentImpl::PaintOverlays(GraphicsContext& context) { … }
void WebDevToolsAgentImpl::DispatchBufferedTouchEvents() { … }
void WebDevToolsAgentImpl::SetPageIsScrolling(bool is_scrolling) { … }
WebInputEventResult WebDevToolsAgentImpl::HandleInputEvent(
const WebInputEvent& event) { … }
void WebDevToolsAgentImpl::ActivatePausedDebuggerWindow(
WebLocalFrameImpl* local_root) { … }
String WebDevToolsAgentImpl::NavigationInitiatorInfo(LocalFrame* frame) { … }
void WebDevToolsAgentImpl::FlushProtocolNotifications() { … }
void WebDevToolsAgentImpl::MainThreadDebuggerPaused() { … }
void WebDevToolsAgentImpl::MainThreadDebuggerResumed() { … }
void WebDevToolsAgentImpl::WillProcessTask(
const base::PendingTask& pending_task,
bool was_blocked_or_low_priority) { … }
void WebDevToolsAgentImpl::DidProcessTask(
const base::PendingTask& pending_task) { … }
}