/* * Copyright (c) 2018-2020, Andreas Kling * Copyright (c) 2021-2022, Sam Atkins * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Browser { class InspectorWidget final : public GUI::Widget { C_OBJECT(InspectorWidget) public: static NonnullRefPtr create(WebView::OutOfProcessWebView& content_view); virtual ~InspectorWidget(); void inspect(); void reset(); void select_default_node(); void select_hovered_node(); private: explicit InspectorWidget(WebView::OutOfProcessWebView& content_view); Gfx::IntPoint to_widget_position(Gfx::IntPoint) const; RefPtr m_inspector_view; OwnPtr m_inspector_client; RefPtr m_dom_node_text_context_menu; RefPtr m_dom_node_tag_context_menu; RefPtr m_dom_node_attribute_context_menu; RefPtr m_edit_node_action; RefPtr m_delete_node_action; RefPtr m_add_attribute_action; RefPtr m_remove_attribute_action; RefPtr m_copy_attribute_value_action; }; }