mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
core: Add getter and setter for WebBrowserApplet frontend
This commit is contained in:
parent
85a3368e6d
commit
32bfa92c71
4 changed files with 22 additions and 2 deletions
|
@ -87,6 +87,8 @@ add_library(core STATIC
|
||||||
frontend/applets/profile_select.h
|
frontend/applets/profile_select.h
|
||||||
frontend/applets/software_keyboard.cpp
|
frontend/applets/software_keyboard.cpp
|
||||||
frontend/applets/software_keyboard.h
|
frontend/applets/software_keyboard.h
|
||||||
|
frontend/applets/web_browser.cpp
|
||||||
|
frontend/applets/web_browser.h
|
||||||
frontend/emu_window.cpp
|
frontend/emu_window.cpp
|
||||||
frontend/emu_window.h
|
frontend/emu_window.h
|
||||||
frontend/framebuffer_layout.cpp
|
frontend/framebuffer_layout.cpp
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
#include "core/loader/loader.h"
|
#include "core/loader/loader.h"
|
||||||
#include "core/perf_stats.h"
|
#include "core/perf_stats.h"
|
||||||
#include "core/telemetry_session.h"
|
#include "core/telemetry_session.h"
|
||||||
|
#include "frontend/applets/profile_select.h"
|
||||||
#include "frontend/applets/software_keyboard.h"
|
#include "frontend/applets/software_keyboard.h"
|
||||||
|
#include "frontend/applets/web_browser.h"
|
||||||
#include "video_core/debug_utils/debug_utils.h"
|
#include "video_core/debug_utils/debug_utils.h"
|
||||||
#include "video_core/gpu.h"
|
#include "video_core/gpu.h"
|
||||||
#include "video_core/renderer_base.h"
|
#include "video_core/renderer_base.h"
|
||||||
|
@ -103,6 +105,8 @@ struct System::Impl {
|
||||||
profile_selector = std::make_unique<Core::Frontend::DefaultProfileSelectApplet>();
|
profile_selector = std::make_unique<Core::Frontend::DefaultProfileSelectApplet>();
|
||||||
if (software_keyboard == nullptr)
|
if (software_keyboard == nullptr)
|
||||||
software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>();
|
software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>();
|
||||||
|
if (web_browser == nullptr)
|
||||||
|
web_browser = std::make_unique<Core::Frontend::DefaultWebBrowserApplet>();
|
||||||
|
|
||||||
auto main_process = Kernel::Process::Create(kernel, "main");
|
auto main_process = Kernel::Process::Create(kernel, "main");
|
||||||
kernel.MakeCurrentProcess(main_process.get());
|
kernel.MakeCurrentProcess(main_process.get());
|
||||||
|
@ -233,6 +237,7 @@ struct System::Impl {
|
||||||
/// Frontend applets
|
/// Frontend applets
|
||||||
std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector;
|
std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector;
|
||||||
std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard;
|
std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard;
|
||||||
|
std::unique_ptr<Core::Frontend::WebBrowserApplet> web_browser;
|
||||||
|
|
||||||
/// Service manager
|
/// Service manager
|
||||||
std::shared_ptr<Service::SM::ServiceManager> service_manager;
|
std::shared_ptr<Service::SM::ServiceManager> service_manager;
|
||||||
|
@ -443,6 +448,14 @@ const Core::Frontend::SoftwareKeyboardApplet& System::GetSoftwareKeyboard() cons
|
||||||
return *impl->software_keyboard;
|
return *impl->software_keyboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void System::SetWebBrowser(std::unique_ptr<Core::Frontend::WebBrowserApplet> applet) {
|
||||||
|
impl->web_browser = std::move(applet);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Core::Frontend::WebBrowserApplet& System::GetWebBrowser() const {
|
||||||
|
return *impl->web_browser;
|
||||||
|
}
|
||||||
|
|
||||||
System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
|
System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
|
||||||
return impl->Init(*this, emu_window);
|
return impl->Init(*this, emu_window);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/file_sys/vfs_types.h"
|
#include "core/file_sys/vfs_types.h"
|
||||||
#include "core/hle/kernel/object.h"
|
#include "core/hle/kernel/object.h"
|
||||||
#include "frontend/applets/profile_select.h"
|
|
||||||
|
|
||||||
namespace Core::Frontend {
|
namespace Core::Frontend {
|
||||||
class EmuWindow;
|
class EmuWindow;
|
||||||
|
class ProfileSelectApplet;
|
||||||
class SoftwareKeyboardApplet;
|
class SoftwareKeyboardApplet;
|
||||||
|
class WebBrowserApplet;
|
||||||
} // namespace Core::Frontend
|
} // namespace Core::Frontend
|
||||||
|
|
||||||
namespace FileSys {
|
namespace FileSys {
|
||||||
|
@ -250,6 +251,10 @@ public:
|
||||||
|
|
||||||
const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const;
|
const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const;
|
||||||
|
|
||||||
|
void SetWebBrowser(std::unique_ptr<Core::Frontend::WebBrowserApplet> applet);
|
||||||
|
|
||||||
|
const Core::Frontend::WebBrowserApplet& GetWebBrowser() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
System();
|
System();
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/frontend/applets/software_keyboard.h"
|
#include "core/frontend/applets/profile_select.h"
|
||||||
#include "core/hle/service/am/am.h"
|
#include "core/hle/service/am/am.h"
|
||||||
#include "core/hle/service/am/applets/profile_select.h"
|
#include "core/hle/service/am/applets/profile_select.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue