diff options
Diffstat (limited to 'Applications/Browser/Tab.h')
-rw-r--r-- | Applications/Browser/Tab.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Applications/Browser/Tab.h b/Applications/Browser/Tab.h index ddf285675a..5bc0b1f2cd 100644 --- a/Applications/Browser/Tab.h +++ b/Applications/Browser/Tab.h @@ -32,15 +32,29 @@ #include <LibHTTP/HttpJob.h> #include <LibWeb/Forward.h> +class WebContentView; + +namespace Web { +class WebViewHooks; +} + namespace Browser { class Tab final : public GUI::Widget { C_OBJECT(Tab); public: + enum class Type { + InProcessWebView, + OutOfProcessWebView, + }; + virtual ~Tab() override; + URL url() const; + void load(const URL&); + void reload(); void did_become_active(); void context_menu_requested(const Gfx::IntPoint& screen_position); @@ -53,14 +67,22 @@ public: const String& title() const { return m_title; } const Gfx::Bitmap* icon() const { return m_icon; } + GUI::Widget& view(); + private: - Tab(); + explicit Tab(Type); + Web::WebViewHooks& hooks(); void update_actions(); void update_bookmark_button(const String& url); + Type m_type; + History<URL> m_history; + RefPtr<Web::PageView> m_page_view; + RefPtr<WebContentView> m_web_content_view; + RefPtr<GUI::Action> m_go_back_action; RefPtr<GUI::Action> m_go_forward_action; RefPtr<GUI::Action> m_reload_action; |