2021-03-23 12:34:34 +00:00
|
|
|
/*
|
|
|
|
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
|
|
|
|
|
|
|
|
#include "ui/widgets/window.h"
|
|
|
|
|
|
|
|
namespace Webview {
|
|
|
|
class Window;
|
|
|
|
} // namespace Webview
|
|
|
|
|
|
|
|
namespace Payments::Ui {
|
|
|
|
|
|
|
|
using namespace ::Ui;
|
|
|
|
|
|
|
|
class PanelDelegate;
|
|
|
|
|
|
|
|
class WebviewWindow final {
|
|
|
|
public:
|
|
|
|
WebviewWindow(
|
2021-03-24 11:30:01 +00:00
|
|
|
const QString &userDataPath,
|
2021-03-23 12:34:34 +00:00
|
|
|
const QString &url,
|
|
|
|
not_null<PanelDelegate*> delegate);
|
|
|
|
|
|
|
|
[[nodiscard]] bool shown() const;
|
|
|
|
void navigate(const QString &url);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::Window _window;
|
|
|
|
Webview::Window *_webview = nullptr;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Payments::Ui
|