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

Browser: Move show_console_window() to Tab

Having the BrowserWindow assigning Tab's internals felt a bit wrong.
This is also a step towards removing BrowserWindow as a friend class.

While I was at it, changed the Tab to having a pointer to the
ConsoleWidget instead of the Window, since that is usually what we want
to use, and it's awkward having to static_cast the main-widget
repeatedly.
This commit is contained in:
Sam Atkins 2021-09-01 17:03:18 +01:00 committed by Andreas Kling
parent 931f462b6e
commit 2b2158595f
3 changed files with 28 additions and 21 deletions

View file

@ -23,6 +23,7 @@ namespace Browser {
class BrowserWindow;
class InspectorWidget;
class ConsoleWidget;
class Tab final : public GUI::Widget {
C_OBJECT(Tab);
@ -66,6 +67,8 @@ public:
};
void show_inspector_window(InspectorTarget);
void show_console_window();
const String& title() const { return m_title; }
const Gfx::Bitmap* icon() const { return m_icon; }
@ -91,7 +94,7 @@ private:
RefPtr<GUI::UrlBox> m_location_box;
RefPtr<GUI::Button> m_bookmark_button;
RefPtr<InspectorWidget> m_dom_inspector_widget;
RefPtr<GUI::Window> m_console_window;
RefPtr<ConsoleWidget> m_console_widget;
RefPtr<GUI::Statusbar> m_statusbar;
RefPtr<GUI::ToolbarContainer> m_toolbar_container;