summaryrefslogtreecommitdiff
path: root/Ladybird/BrowserWindow.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-03-20 19:52:00 -0400
committerLinus Groh <mail@linusgroh.de>2023-03-21 09:39:49 +0000
commitf8b6369c238a57abb2fb3f5b093c5b629070e1f4 (patch)
tree7faaf422c0727e429f19c02fed969e928e39446a /Ladybird/BrowserWindow.cpp
parenta77daf77bdc44d8150f3da698dcf3aa1f4917347 (diff)
downloadserenity-f8b6369c238a57abb2fb3f5b093c5b629070e1f4.zip
WebContent+Everywhere: Add a WebContent IPC to activate a tab
Diffstat (limited to 'Ladybird/BrowserWindow.cpp')
-rw-r--r--Ladybird/BrowserWindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Ladybird/BrowserWindow.cpp b/Ladybird/BrowserWindow.cpp
index 5b4c61d7fc..c346187d8f 100644
--- a/Ladybird/BrowserWindow.cpp
+++ b/Ladybird/BrowserWindow.cpp
@@ -401,6 +401,11 @@ Tab& BrowserWindow::new_tab(QString const& url, Web::HTML::ActivateTab activate_
return *tab_ptr;
}
+void BrowserWindow::activate_tab(int index)
+{
+ m_tabs_container->setCurrentIndex(index);
+}
+
void BrowserWindow::close_tab(int index)
{
auto* tab = m_tabs_container->widget(index);