mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:34:59 +00:00

Having so much the logic and lambdas in main() was getting unwieldy. Moving it into a class simplifies this, and also opens up a path towards supporting "Open in New Window" :^)
38 lines
733 B
C++
38 lines
733 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "BookmarksBarWidget.h"
|
|
#include "WindowActions.h"
|
|
#include <LibGUI/Window.h>
|
|
|
|
namespace Browser {
|
|
|
|
class CookieJar;
|
|
class Tab;
|
|
|
|
class BrowserWindow final : public GUI::Window {
|
|
C_OBJECT(BrowserWindow);
|
|
|
|
public:
|
|
virtual ~BrowserWindow() override;
|
|
|
|
GUI::TabWidget& tab_widget();
|
|
void create_new_tab(URL, bool activate);
|
|
|
|
private:
|
|
explicit BrowserWindow(CookieJar&, URL);
|
|
|
|
void set_window_title_for_tab(Tab const&);
|
|
|
|
CookieJar& m_cookie_jar;
|
|
WindowActions m_window_actions;
|
|
RefPtr<GUI::TabWidget> m_tab_widget;
|
|
RefPtr<BookmarksBarWidget> m_bookmarks_bar;
|
|
};
|
|
|
|
}
|