2022-04-23 08:59:50 +00:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-12-24 21:21:41 +00:00
|
|
|
|
|
|
|
#include "common/logging/log.h"
|
|
|
|
#include "core/frontend/applets/web_browser.h"
|
|
|
|
|
|
|
|
namespace Core::Frontend {
|
|
|
|
|
|
|
|
WebBrowserApplet::~WebBrowserApplet() = default;
|
|
|
|
|
|
|
|
DefaultWebBrowserApplet::~DefaultWebBrowserApplet() = default;
|
|
|
|
|
2022-12-05 23:46:57 +00:00
|
|
|
void DefaultWebBrowserApplet::OpenLocalWebPage(const std::string& local_url,
|
|
|
|
ExtractROMFSCallback extract_romfs_callback,
|
|
|
|
OpenWebPageCallback callback) const {
|
2020-11-15 14:00:19 +00:00
|
|
|
LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to open local web page at {}",
|
|
|
|
local_url);
|
|
|
|
|
2020-11-30 15:15:00 +00:00
|
|
|
callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/");
|
2020-11-15 14:00:19 +00:00
|
|
|
}
|
|
|
|
|
2022-12-05 23:46:57 +00:00
|
|
|
void DefaultWebBrowserApplet::OpenExternalWebPage(const std::string& external_url,
|
|
|
|
OpenWebPageCallback callback) const {
|
2020-12-08 11:20:45 +00:00
|
|
|
LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to open external web page at {}",
|
|
|
|
external_url);
|
|
|
|
|
|
|
|
callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/");
|
|
|
|
}
|
|
|
|
|
2018-12-24 21:21:41 +00:00
|
|
|
} // namespace Core::Frontend
|