/* * This file is part of smolbote. It's copyrighted by the contributors recorded * in the version control history of the file, available from its original * location: https://neueland.iserlohn-fortress.net/smolbote.hg * * SPDX-License-Identifier: GPL-3.0 */ #ifndef SMOLBOTE_BROWSER_H #define SMOLBOTE_BROWSER_H #include "SingleApplication/singleapplication.h" #include #include #include #include #include QVector loadPlugins(const QString &location); class Configuration; class BookmarksWidget; class DownloadsWidget; class UrlRequestInterceptor; class MainWindow; class WebProfile; class Browser : public SingleApplication, public BrowserInterface { Q_OBJECT public: explicit Browser(int &argc, char *argv[], bool allowSecondary = true); ~Browser() final; public slots: void about(); public: void setConfiguration(std::unique_ptr &config); Configuration *getConfiguration() const override; void registerPlugin(const Plugin &plugin); void setup(const QString &defaultProfile); std::shared_ptr bookmarks() { return m_bookmarks; } const QVector profiles() const override; public slots: void createSession(const QJsonObject &object); MainWindow *createWindow(); private: Q_DISABLE_COPY(Browser) std::unique_ptr m_config; std::shared_ptr m_bookmarks; std::unique_ptr m_downloads; std::unique_ptr m_urlFilter; QVector m_windows; QVector m_plugins; }; #endif // SMOLBOTE_BROWSER_H