1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:07:46 +00:00

Browser: Pop up a context menu when one is requested on a tab

Currently, the tab's context menu only has options to reload and
close, but this patch allows for those options to be quickly
expanded!
This commit is contained in:
FalseHonesty 2020-05-18 18:37:12 -04:00 committed by Andreas Kling
parent bf2e6325a4
commit 9241c3a957
3 changed files with 21 additions and 0 deletions

View file

@ -43,6 +43,7 @@ public:
void load(const URL&);
void did_become_active();
void context_menu_requested(const Gfx::Point& screen_position);
Function<void(String)> on_title_change;
Function<void(const URL&)> on_tab_open_request;
@ -73,6 +74,8 @@ private:
RefPtr<GUI::Menu> m_link_context_menu;
String m_link_context_menu_href;
RefPtr<GUI::Menu> m_tab_context_menu;
String m_title;
RefPtr<const Gfx::Bitmap> m_icon;