2018-12-24 21:21:41 +00:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <functional>
|
2020-11-15 14:00:19 +00:00
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include "core/hle/service/am/applets/web_types.h"
|
|
|
|
|
2018-12-24 21:21:41 +00:00
|
|
|
namespace Core::Frontend {
|
|
|
|
|
|
|
|
class WebBrowserApplet {
|
|
|
|
public:
|
|
|
|
virtual ~WebBrowserApplet();
|
2020-11-15 14:00:19 +00:00
|
|
|
|
|
|
|
virtual void OpenLocalWebPage(
|
2020-11-30 15:15:00 +00:00
|
|
|
std::string_view local_url, std::function<void()> extract_romfs_callback,
|
|
|
|
std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback) const = 0;
|
2018-12-24 21:21:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DefaultWebBrowserApplet final : public WebBrowserApplet {
|
|
|
|
public:
|
|
|
|
~DefaultWebBrowserApplet() override;
|
2020-11-15 14:00:19 +00:00
|
|
|
|
2020-11-30 15:15:00 +00:00
|
|
|
void OpenLocalWebPage(std::string_view local_url, std::function<void()> extract_romfs_callback,
|
|
|
|
std::function<void(Service::AM::Applets::WebExitReason, std::string)>
|
|
|
|
callback) const override;
|
2018-12-24 21:21:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Core::Frontend
|