summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-12-24 16:22:07 -0500
committerGravatar Zach Hilman2018-12-28 15:32:39 -0500
commit32bfa92c7137d20f2c105595831b3c8cefe40326 (patch)
tree58915a61c31a5e2c967d866c1fc6099e21a042da /src
parentfrontend: Add frontend responder for web browser (diff)
downloadyuzu-32bfa92c7137d20f2c105595831b3c8cefe40326.tar.gz
yuzu-32bfa92c7137d20f2c105595831b3c8cefe40326.tar.xz
yuzu-32bfa92c7137d20f2c105595831b3c8cefe40326.zip
core: Add getter and setter for WebBrowserApplet frontend
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/core.cpp13
-rw-r--r--src/core/core.h7
-rw-r--r--src/core/hle/service/am/applets/profile_select.cpp2
4 files changed, 22 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 82c934f7e..94a576508 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -87,6 +87,8 @@ add_library(core STATIC
87 frontend/applets/profile_select.h 87 frontend/applets/profile_select.h
88 frontend/applets/software_keyboard.cpp 88 frontend/applets/software_keyboard.cpp
89 frontend/applets/software_keyboard.h 89 frontend/applets/software_keyboard.h
90 frontend/applets/web_browser.cpp
91 frontend/applets/web_browser.h
90 frontend/emu_window.cpp 92 frontend/emu_window.cpp
91 frontend/emu_window.h 93 frontend/emu_window.h
92 frontend/framebuffer_layout.cpp 94 frontend/framebuffer_layout.cpp
diff --git a/src/core/core.cpp b/src/core/core.cpp
index fd10199ec..373dff2e6 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -31,7 +31,9 @@
31#include "core/loader/loader.h" 31#include "core/loader/loader.h"
32#include "core/perf_stats.h" 32#include "core/perf_stats.h"
33#include "core/telemetry_session.h" 33#include "core/telemetry_session.h"
34#include "frontend/applets/profile_select.h"
34#include "frontend/applets/software_keyboard.h" 35#include "frontend/applets/software_keyboard.h"
36#include "frontend/applets/web_browser.h"
35#include "video_core/debug_utils/debug_utils.h" 37#include "video_core/debug_utils/debug_utils.h"
36#include "video_core/gpu.h" 38#include "video_core/gpu.h"
37#include "video_core/renderer_base.h" 39#include "video_core/renderer_base.h"
@@ -103,6 +105,8 @@ struct System::Impl {
103 profile_selector = std::make_unique<Core::Frontend::DefaultProfileSelectApplet>(); 105 profile_selector = std::make_unique<Core::Frontend::DefaultProfileSelectApplet>();
104 if (software_keyboard == nullptr) 106 if (software_keyboard == nullptr)
105 software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>(); 107 software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>();
108 if (web_browser == nullptr)
109 web_browser = std::make_unique<Core::Frontend::DefaultWebBrowserApplet>();
106 110
107 auto main_process = Kernel::Process::Create(kernel, "main"); 111 auto main_process = Kernel::Process::Create(kernel, "main");
108 kernel.MakeCurrentProcess(main_process.get()); 112 kernel.MakeCurrentProcess(main_process.get());
@@ -233,6 +237,7 @@ struct System::Impl {
233 /// Frontend applets 237 /// Frontend applets
234 std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector; 238 std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector;
235 std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; 239 std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard;
240 std::unique_ptr<Core::Frontend::WebBrowserApplet> web_browser;
236 241
237 /// Service manager 242 /// Service manager
238 std::shared_ptr<Service::SM::ServiceManager> service_manager; 243 std::shared_ptr<Service::SM::ServiceManager> service_manager;
@@ -443,6 +448,14 @@ const Core::Frontend::SoftwareKeyboardApplet& System::GetSoftwareKeyboard() cons
443 return *impl->software_keyboard; 448 return *impl->software_keyboard;
444} 449}
445 450
451void System::SetWebBrowser(std::unique_ptr<Core::Frontend::WebBrowserApplet> applet) {
452 impl->web_browser = std::move(applet);
453}
454
455const Core::Frontend::WebBrowserApplet& System::GetWebBrowser() const {
456 return *impl->web_browser;
457}
458
446System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) { 459System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
447 return impl->Init(*this, emu_window); 460 return impl->Init(*this, emu_window);
448} 461}
diff --git a/src/core/core.h b/src/core/core.h
index 869921493..a53dbb4d4 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -11,11 +11,12 @@
11#include "common/common_types.h" 11#include "common/common_types.h"
12#include "core/file_sys/vfs_types.h" 12#include "core/file_sys/vfs_types.h"
13#include "core/hle/kernel/object.h" 13#include "core/hle/kernel/object.h"
14#include "frontend/applets/profile_select.h"
15 14
16namespace Core::Frontend { 15namespace Core::Frontend {
17class EmuWindow; 16class EmuWindow;
17class ProfileSelectApplet;
18class SoftwareKeyboardApplet; 18class SoftwareKeyboardApplet;
19class WebBrowserApplet;
19} // namespace Core::Frontend 20} // namespace Core::Frontend
20 21
21namespace FileSys { 22namespace FileSys {
@@ -250,6 +251,10 @@ public:
250 251
251 const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const; 252 const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const;
252 253
254 void SetWebBrowser(std::unique_ptr<Core::Frontend::WebBrowserApplet> applet);
255
256 const Core::Frontend::WebBrowserApplet& GetWebBrowser() const;
257
253private: 258private:
254 System(); 259 System();
255 260
diff --git a/src/core/hle/service/am/applets/profile_select.cpp b/src/core/hle/service/am/applets/profile_select.cpp
index 4c7b45454..14e2a1fee 100644
--- a/src/core/hle/service/am/applets/profile_select.cpp
+++ b/src/core/hle/service/am/applets/profile_select.cpp
@@ -7,7 +7,7 @@
7#include "common/assert.h" 7#include "common/assert.h"
8#include "common/string_util.h" 8#include "common/string_util.h"
9#include "core/core.h" 9#include "core/core.h"
10#include "core/frontend/applets/software_keyboard.h" 10#include "core/frontend/applets/profile_select.h"
11#include "core/hle/service/am/am.h" 11#include "core/hle/service/am/am.h"
12#include "core/hle/service/am/applets/profile_select.h" 12#include "core/hle/service/am/applets/profile_select.h"
13 13