mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-23 18:57:12 +00:00
43 lines
849 B
C
43 lines
849 B
C
|
/*
|
||
|
This file is part of Telegram Desktop,
|
||
|
the official desktop application for the Telegram messaging service.
|
||
|
|
||
|
For license and copyright information please follow this link:
|
||
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||
|
*/
|
||
|
#pragma once
|
||
|
|
||
|
namespace Webview {
|
||
|
struct DataRequest;
|
||
|
class Window;
|
||
|
} // namespace Webview
|
||
|
|
||
|
namespace Ui {
|
||
|
class RpWindow;
|
||
|
} // namespace Ui
|
||
|
|
||
|
namespace Iv {
|
||
|
|
||
|
struct Prepared;
|
||
|
|
||
|
class Controller final {
|
||
|
public:
|
||
|
Controller();
|
||
|
~Controller();
|
||
|
|
||
|
void show(const QString &dataPath, Prepared page);
|
||
|
|
||
|
[[nodiscard]] rpl::producer<Webview::DataRequest> dataRequests() const;
|
||
|
|
||
|
[[nodiscard]] rpl::lifetime &lifetime();
|
||
|
|
||
|
private:
|
||
|
std::unique_ptr<Ui::RpWindow> _window;
|
||
|
std::unique_ptr<Webview::Window> _webview;
|
||
|
rpl::event_stream<Webview::DataRequest> _dataRequests;
|
||
|
rpl::lifetime _lifetime;
|
||
|
|
||
|
};
|
||
|
|
||
|
} // namespace Iv
|