diff options
| author | 2020-12-08 06:20:45 -0500 | |
|---|---|---|
| committer | 2020-12-18 10:33:28 -0500 | |
| commit | 82fa9f8d56bc285e7bb58fc81b495a55be9ea82c (patch) | |
| tree | 19ca59277d5730dc76d632ab1f0a135f25f19415 /src/core/frontend/applets | |
| parent | applets/web: Fix keyboard to emulated controller input (diff) | |
| download | yuzu-82fa9f8d56bc285e7bb58fc81b495a55be9ea82c.tar.gz yuzu-82fa9f8d56bc285e7bb58fc81b495a55be9ea82c.tar.xz yuzu-82fa9f8d56bc285e7bb58fc81b495a55be9ea82c.zip | |
applets/web: Implement the online web browser applet
Diffstat (limited to 'src/core/frontend/applets')
| -rw-r--r-- | src/core/frontend/applets/web_browser.cpp | 9 | ||||
| -rw-r--r-- | src/core/frontend/applets/web_browser.h | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/core/frontend/applets/web_browser.cpp b/src/core/frontend/applets/web_browser.cpp index a5d8f82ac..50db6a654 100644 --- a/src/core/frontend/applets/web_browser.cpp +++ b/src/core/frontend/applets/web_browser.cpp | |||
| @@ -20,4 +20,13 @@ void DefaultWebBrowserApplet::OpenLocalWebPage( | |||
| 20 | callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/"); | 20 | callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/"); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | void DefaultWebBrowserApplet::OpenExternalWebPage( | ||
| 24 | std::string_view external_url, | ||
| 25 | std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback) const { | ||
| 26 | LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to open external web page at {}", | ||
| 27 | external_url); | ||
| 28 | |||
| 29 | callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/"); | ||
| 30 | } | ||
| 31 | |||
| 23 | } // namespace Core::Frontend | 32 | } // namespace Core::Frontend |
diff --git a/src/core/frontend/applets/web_browser.h b/src/core/frontend/applets/web_browser.h index 5b0629cfb..1c5ef19a9 100644 --- a/src/core/frontend/applets/web_browser.h +++ b/src/core/frontend/applets/web_browser.h | |||
| @@ -18,6 +18,10 @@ public: | |||
| 18 | virtual void OpenLocalWebPage( | 18 | virtual void OpenLocalWebPage( |
| 19 | std::string_view local_url, std::function<void()> extract_romfs_callback, | 19 | std::string_view local_url, std::function<void()> extract_romfs_callback, |
| 20 | std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback) const = 0; | 20 | std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback) const = 0; |
| 21 | |||
| 22 | virtual void OpenExternalWebPage( | ||
| 23 | std::string_view external_url, | ||
| 24 | std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback) const = 0; | ||
| 21 | }; | 25 | }; |
| 22 | 26 | ||
| 23 | class DefaultWebBrowserApplet final : public WebBrowserApplet { | 27 | class DefaultWebBrowserApplet final : public WebBrowserApplet { |
| @@ -27,6 +31,10 @@ public: | |||
| 27 | void OpenLocalWebPage(std::string_view local_url, std::function<void()> extract_romfs_callback, | 31 | void OpenLocalWebPage(std::string_view local_url, std::function<void()> extract_romfs_callback, |
| 28 | std::function<void(Service::AM::Applets::WebExitReason, std::string)> | 32 | std::function<void(Service::AM::Applets::WebExitReason, std::string)> |
| 29 | callback) const override; | 33 | callback) const override; |
| 34 | |||
| 35 | void OpenExternalWebPage(std::string_view external_url, | ||
| 36 | std::function<void(Service::AM::Applets::WebExitReason, std::string)> | ||
| 37 | callback) const override; | ||
| 30 | }; | 38 | }; |
| 31 | 39 | ||
| 32 | } // namespace Core::Frontend | 40 | } // namespace Core::Frontend |