diff --git a/Base/res/icons/16x16/network.png b/Base/res/icons/16x16/network.png new file mode 100644 index 0000000000..a784ac1206 Binary files /dev/null and b/Base/res/icons/16x16/network.png differ diff --git a/Ladybird/Qt/BrowserWindow.cpp b/Ladybird/Qt/BrowserWindow.cpp index 0b010b7cb8..c14fb46903 100644 --- a/Ladybird/Qt/BrowserWindow.cpp +++ b/Ladybird/Qt/BrowserWindow.cpp @@ -432,6 +432,11 @@ BrowserWindow::BrowserWindow(Vector const& initial_urls, WebView::Cook debug_request("dump-local-storage"); }); + auto* dump_connection_info = new QAction("Dump Co&nnection Info", this); + dump_connection_info->setIcon(load_icon_from_uri("resource://icons/16x16/network.png"sv)); + debug_menu->addAction(dump_connection_info); + QObject::connect(dump_connection_info, &QAction::triggered, this, &BrowserWindow::dump_connection_info); + debug_menu->addSeparator(); m_show_line_box_borders_action = new QAction("Show Line Box Borders", this); @@ -1227,4 +1232,10 @@ void BrowserWindow::closeEvent(QCloseEvent* event) QMainWindow::closeEvent(event); } +void BrowserWindow::dump_connection_info() +{ + if (auto& application = static_cast(WebView::Application::the()); application.request_server_client) + application.request_server_client->dump_connection_info(); +} + } diff --git a/Ladybird/Qt/BrowserWindow.h b/Ladybird/Qt/BrowserWindow.h index 86ab2d09da..31d278fd07 100644 --- a/Ladybird/Qt/BrowserWindow.h +++ b/Ladybird/Qt/BrowserWindow.h @@ -183,6 +183,8 @@ private: Web::CSS::PreferredColorScheme m_preferred_color_scheme; void set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_scheme); + static void dump_connection_info(); + QTabWidget* m_tabs_container { nullptr }; Tab* m_current_tab { nullptr }; QMenu* m_zoom_menu { nullptr }; diff --git a/Ladybird/cmake/ResourceFiles.cmake b/Ladybird/cmake/ResourceFiles.cmake index ca5b6743f5..ff371ffcec 100644 --- a/Ladybird/cmake/ResourceFiles.cmake +++ b/Ladybird/cmake/ResourceFiles.cmake @@ -23,6 +23,7 @@ set(16x16_ICONS history.png layers.png layout.png + network.png new-tab.png open-parent-directory.png paste.png diff --git a/Meta/gn/secondary/Ladybird/BUILD.gn b/Meta/gn/secondary/Ladybird/BUILD.gn index fe0002ecb6..b9d5653891 100644 --- a/Meta/gn/secondary/Ladybird/BUILD.gn +++ b/Meta/gn/secondary/Ladybird/BUILD.gn @@ -226,6 +226,7 @@ icons_16x16 = [ "//Base/res/icons/16x16/history.png", "//Base/res/icons/16x16/layers.png", "//Base/res/icons/16x16/layout.png", + "//Base/res/icons/16x16/network.png", "//Base/res/icons/16x16/new-tab.png", "//Base/res/icons/16x16/open-parent-directory.png", "//Base/res/icons/16x16/paste.png",