mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:17:46 +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
|
@ -21,6 +21,8 @@ class WebViewHooks;
|
|||
|
||||
namespace Browser {
|
||||
|
||||
class BrowserWindow;
|
||||
|
||||
class Tab final : public GUI::Widget {
|
||||
C_OBJECT(Tab);
|
||||
|
||||
|
@ -67,7 +69,10 @@ public:
|
|||
GUI::AbstractScrollableWidget& view();
|
||||
|
||||
private:
|
||||
explicit Tab(Type);
|
||||
explicit Tab(BrowserWindow&, Type);
|
||||
|
||||
BrowserWindow const& window() const;
|
||||
BrowserWindow& window();
|
||||
|
||||
Web::WebViewHooks& hooks();
|
||||
void update_actions();
|
||||
|
@ -82,10 +87,6 @@ private:
|
|||
RefPtr<Web::InProcessWebView> m_page_view;
|
||||
RefPtr<Web::OutOfProcessWebView> m_web_content_view;
|
||||
|
||||
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::TextBox> m_location_box;
|
||||
RefPtr<GUI::Button> m_bookmark_button;
|
||||
RefPtr<GUI::Window> m_dom_inspector_window;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue