mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
Browser: Move menu management from Tab to BrowserWindow
It was very confusing for every Tab to have their own GUI::Menubar that got dynamically swapped in/out when switching tabs. This change moves us to a single menubar per window, and BrowserWindow is the owner of its own menubar.
This commit is contained in:
parent
e5367c13d8
commit
aed695d4b2
6 changed files with 345 additions and 304 deletions
|
@ -24,6 +24,9 @@ namespace Browser {
|
|||
class Tab final : public GUI::Widget {
|
||||
C_OBJECT(Tab);
|
||||
|
||||
// FIXME: This should go away eventually.
|
||||
friend class BrowserWindow;
|
||||
|
||||
public:
|
||||
enum class Type {
|
||||
InProcessWebView,
|
||||
|
@ -88,7 +91,6 @@ private:
|
|||
RefPtr<GUI::Window> m_dom_inspector_window;
|
||||
RefPtr<GUI::Window> m_console_window;
|
||||
RefPtr<GUI::Statusbar> m_statusbar;
|
||||
RefPtr<GUI::Menubar> m_menubar;
|
||||
RefPtr<GUI::ToolbarContainer> m_toolbar_container;
|
||||
|
||||
RefPtr<GUI::Menu> m_link_context_menu;
|
||||
|
@ -99,10 +101,6 @@ private:
|
|||
Gfx::ShareableBitmap m_image_context_menu_bitmap;
|
||||
URL m_image_context_menu_url;
|
||||
|
||||
GUI::ActionGroup m_user_agent_spoof_actions;
|
||||
GUI::ActionGroup m_search_engine_actions;
|
||||
RefPtr<GUI::Action> m_disable_user_agent_spoofing;
|
||||
|
||||
RefPtr<GUI::Menu> m_tab_context_menu;
|
||||
RefPtr<GUI::Menu> m_page_context_menu;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue