summaryrefslogtreecommitdiff
path: root/Userland/Applications/Browser/WindowActions.h
diff options
context:
space:
mode:
authorKemal Zebari <kemalzebra@gmail.com>2022-10-06 01:34:25 -0700
committerSam Atkins <atkinssj@gmail.com>2022-10-06 16:52:57 +0100
commit90719d34afc762f0e21a61c91a6f47d18d578ac0 (patch)
tree60a4bf1cd72bb161ce932103c20378351dac42a3 /Userland/Applications/Browser/WindowActions.h
parent48389f4179c734b412587f8d9da620688ff20d35 (diff)
downloadserenity-90719d34afc762f0e21a61c91a6f47d18d578ac0.zip
Browser: Provide ability to create new browser windows
This change allows a user to spawn new browser processes by either going to "File -> New Window" or by the shortcut "Ctrl + N".
Diffstat (limited to 'Userland/Applications/Browser/WindowActions.h')
-rw-r--r--Userland/Applications/Browser/WindowActions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/WindowActions.h b/Userland/Applications/Browser/WindowActions.h
index 0c208a642d..fb2a70335e 100644
--- a/Userland/Applications/Browser/WindowActions.h
+++ b/Userland/Applications/Browser/WindowActions.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -17,6 +18,7 @@ public:
WindowActions(GUI::Window&);
Function<void()> on_create_new_tab;
+ Function<void()> on_create_new_window;
Function<void()> on_next_tab;
Function<void()> on_previous_tab;
Vector<Function<void()>> on_tabs;
@@ -25,6 +27,7 @@ public:
Function<void(GUI::Action&)> on_vertical_tabs;
GUI::Action& create_new_tab_action() { return *m_create_new_tab_action; }
+ GUI::Action& create_new_window_action() { return *m_create_new_window_action; }
GUI::Action& next_tab_action() { return *m_next_tab_action; }
GUI::Action& previous_tab_action() { return *m_previous_tab_action; }
GUI::Action& about_action() { return *m_about_action; }
@@ -33,6 +36,7 @@ public:
private:
RefPtr<GUI::Action> m_create_new_tab_action;
+ RefPtr<GUI::Action> m_create_new_window_action;
RefPtr<GUI::Action> m_next_tab_action;
RefPtr<GUI::Action> m_previous_tab_action;
NonnullRefPtrVector<GUI::Action> m_tab_actions;