mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
Browser: Move actions from Tab to BrowserWindow
Navigation actions (back/forward/home/reload) now live in BrowserWindow instead of being duplicated in every new Tab instance.
This commit is contained in:
parent
aed695d4b2
commit
a743075b9f
4 changed files with 69 additions and 47 deletions
|
@ -26,12 +26,26 @@ public:
|
|||
Tab& active_tab();
|
||||
void create_new_tab(URL, bool activate);
|
||||
|
||||
GUI::Action& go_back_action() { return *m_go_back_action; }
|
||||
GUI::Action& go_forward_action() { return *m_go_forward_action; }
|
||||
GUI::Action& go_home_action() { return *m_go_home_action; }
|
||||
GUI::Action& reload_action() { return *m_reload_action; }
|
||||
GUI::Action& view_source_action() { return *m_view_source_action; }
|
||||
GUI::Action& inspect_dom_tree_action() { return *m_inspect_dom_tree_action; }
|
||||
|
||||
private:
|
||||
explicit BrowserWindow(CookieJar&, URL);
|
||||
|
||||
void build_menus();
|
||||
void set_window_title_for_tab(Tab const&);
|
||||
|
||||
RefPtr<GUI::Action> m_go_back_action;
|
||||
RefPtr<GUI::Action> m_go_forward_action;
|
||||
RefPtr<GUI::Action> m_go_home_action;
|
||||
RefPtr<GUI::Action> m_reload_action;
|
||||
RefPtr<GUI::Action> m_view_source_action;
|
||||
RefPtr<GUI::Action> m_inspect_dom_tree_action;
|
||||
|
||||
CookieJar& m_cookie_jar;
|
||||
WindowActions m_window_actions;
|
||||
RefPtr<GUI::TabWidget> m_tab_widget;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue