2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
2021-09-02 14:01:19 +03:00
|
|
|
* Copyright (c) 2021, Sam Atkins <atkinssj@gmail.com>
|
2020-01-18 11:38:21 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2020-05-28 21:40:53 +03:00
|
|
|
#pragma once
|
|
|
|
|
2020-02-06 22:33:02 +03:00
|
|
|
#include <LibGUI/Widget.h>
|
2020-03-07 12:32:51 +03:00
|
|
|
#include <LibWeb/Forward.h>
|
2020-01-02 16:55:19 +03:00
|
|
|
|
2020-05-08 22:38:30 +03:00
|
|
|
namespace Browser {
|
|
|
|
|
2020-02-02 17:07:41 +03:00
|
|
|
class InspectorWidget final : public GUI::Widget {
|
2020-01-02 16:55:19 +03:00
|
|
|
C_OBJECT(InspectorWidget)
|
|
|
|
public:
|
|
|
|
virtual ~InspectorWidget();
|
|
|
|
|
2021-09-02 14:05:32 +03:00
|
|
|
void set_web_view(NonnullRefPtr<Web::OutOfProcessWebView> web_view) { m_web_view = web_view; }
|
|
|
|
|
2021-06-08 00:21:16 +03:00
|
|
|
void set_dom_json(String);
|
2021-09-02 14:05:32 +03:00
|
|
|
void set_dom_node_properties_json(i32 node_id, String specified_values_json, String computed_values_json);
|
2020-01-02 16:55:19 +03:00
|
|
|
|
|
|
|
private:
|
2020-02-23 14:07:13 +03:00
|
|
|
InspectorWidget();
|
2020-01-02 16:55:19 +03:00
|
|
|
|
2021-06-08 00:21:16 +03:00
|
|
|
void set_inspected_node(GUI::ModelIndex);
|
2020-06-12 23:30:11 +03:00
|
|
|
|
2021-09-02 14:05:32 +03:00
|
|
|
RefPtr<Web::OutOfProcessWebView> m_web_view;
|
|
|
|
|
2020-02-02 17:07:41 +03:00
|
|
|
RefPtr<GUI::TreeView> m_dom_tree_view;
|
2020-06-12 23:30:11 +03:00
|
|
|
RefPtr<GUI::TreeView> m_layout_tree_view;
|
2020-02-02 17:07:41 +03:00
|
|
|
RefPtr<GUI::TableView> m_style_table_view;
|
|
|
|
RefPtr<GUI::TableView> m_computed_style_table_view;
|
2021-06-08 00:21:16 +03:00
|
|
|
|
2021-09-02 14:05:32 +03:00
|
|
|
// Multi-process mode
|
2021-06-08 00:21:16 +03:00
|
|
|
Optional<String> m_dom_json;
|
2021-09-02 14:05:32 +03:00
|
|
|
i32 m_inspected_node_id;
|
|
|
|
Optional<String> m_inspected_node_specified_values_json;
|
|
|
|
Optional<String> m_inspected_node_computed_values_json;
|
2020-01-02 16:55:19 +03:00
|
|
|
};
|
2020-05-08 22:38:30 +03:00
|
|
|
|
|
|
|
}
|