mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-27 20:04:19 +01:00
web_browser: Make OpenPage const
This commit is contained in:
parent
ec0bc3061e
commit
f7540157e4
@ -13,7 +13,7 @@ DefaultWebBrowserApplet::~DefaultWebBrowserApplet() = default;
|
||||
|
||||
void DefaultWebBrowserApplet::OpenPage(std::string_view filename,
|
||||
std::function<void()> unpack_romfs_callback,
|
||||
std::function<void()> finished_callback) {
|
||||
std::function<void()> finished_callback) const {
|
||||
LOG_INFO(Service_AM,
|
||||
"(STUBBED) called - No suitable web browser implementation found to open website page "
|
||||
"at '{}'!",
|
||||
|
@ -14,7 +14,7 @@ public:
|
||||
virtual ~WebBrowserApplet();
|
||||
|
||||
virtual void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||
std::function<void()> finished_callback) = 0;
|
||||
std::function<void()> finished_callback) const = 0;
|
||||
};
|
||||
|
||||
class DefaultWebBrowserApplet final : public WebBrowserApplet {
|
||||
@ -22,7 +22,7 @@ public:
|
||||
~DefaultWebBrowserApplet() override;
|
||||
|
||||
void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||
std::function<void()> finished_callback) override;
|
||||
std::function<void()> finished_callback) const override;
|
||||
};
|
||||
|
||||
} // namespace Core::Frontend
|
||||
|
@ -88,7 +88,7 @@ QtWebBrowser::QtWebBrowser(GMainWindow& main_window) {
|
||||
QtWebBrowser::~QtWebBrowser() = default;
|
||||
|
||||
void QtWebBrowser::OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||
std::function<void()> finished_callback) {
|
||||
std::function<void()> finished_callback) const {
|
||||
this->unpack_romfs_callback = std::move(unpack_romfs_callback);
|
||||
this->finished_callback = std::move(finished_callback);
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
~QtWebBrowser() override;
|
||||
|
||||
void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||
std::function<void()> finished_callback) override;
|
||||
std::function<void()> finished_callback) const override;
|
||||
|
||||
signals:
|
||||
void MainWindowOpenPage(std::string_view filename, std::string_view additional_args) const;
|
||||
@ -47,6 +47,6 @@ private:
|
||||
void MainWindowUnpackRomFS();
|
||||
void MainWindowFinishedBrowsing();
|
||||
|
||||
std::function<void()> unpack_romfs_callback;
|
||||
std::function<void()> finished_callback;
|
||||
mutable std::function<void()> unpack_romfs_callback;
|
||||
mutable std::function<void()> finished_callback;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user