diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-03-15 15:48:16 +0300 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-03-16 13:17:37 -0400 |
commit | 9d79a9b214af9470b3cee732f2ad420379b99a3c (patch) | |
tree | fa1271b404aa500d8c0a1ac1ee663f659cbdfe10 /Userland/Applications/Browser/BrowserWindow.cpp | |
parent | 640864b32ed3c5c6dde9d9c13faa079fc58def08 (diff) | |
download | serenity-9d79a9b214af9470b3cee732f2ad420379b99a3c.zip |
Browser: Implement `notify_request_open_new_tab`
Diffstat (limited to 'Userland/Applications/Browser/BrowserWindow.cpp')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 9130c2759e..e5fbf64b36 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -565,7 +565,7 @@ void BrowserWindow::set_window_title_for_tab(Tab const& tab) set_title(DeprecatedString::formatted("{} - Browser", title.is_empty() ? url.to_deprecated_string() : title)); } -void BrowserWindow::create_new_tab(URL url, bool activate) +Tab& BrowserWindow::create_new_tab(URL url, bool activate) { auto& new_tab = m_tab_widget->add_tab<Browser::Tab>("New tab"_short_string, *this); @@ -652,6 +652,8 @@ void BrowserWindow::create_new_tab(URL url, bool activate) if (activate) m_tab_widget->set_active_widget(&new_tab); + + return new_tab; } void BrowserWindow::create_new_window(URL url) |