1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

Browser: Implement notify_request_open_new_tab

This commit is contained in:
Aliaksandr Kalenik 2023-03-15 15:48:16 +03:00 committed by Tim Flynn
parent 640864b32e
commit 9d79a9b214
3 changed files with 9 additions and 2 deletions

View file

@ -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)