|
@@ -4,6 +4,7 @@
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+#include "AudioCodecPluginSerenity.h"
|
|
#include "ImageCodecPluginSerenity.h"
|
|
#include "ImageCodecPluginSerenity.h"
|
|
#include <LibCore/EventLoop.h>
|
|
#include <LibCore/EventLoop.h>
|
|
#include <LibCore/LocalServer.h>
|
|
#include <LibCore/LocalServer.h>
|
|
@@ -25,7 +26,7 @@
|
|
ErrorOr<int> serenity_main(Main::Arguments)
|
|
ErrorOr<int> serenity_main(Main::Arguments)
|
|
{
|
|
{
|
|
Core::EventLoop event_loop;
|
|
Core::EventLoop event_loop;
|
|
- TRY(Core::System::pledge("stdio recvfd sendfd accept unix rpath thread"));
|
|
|
|
|
|
+ TRY(Core::System::pledge("stdio recvfd sendfd accept unix rpath thread proc"));
|
|
|
|
|
|
// This must be first; we can't check if /tmp/webdriver exists once we've unveiled other paths.
|
|
// This must be first; we can't check if /tmp/webdriver exists once we've unveiled other paths.
|
|
auto webdriver_socket_path = DeprecatedString::formatted("{}/webdriver", TRY(Core::StandardPaths::runtime_directory()));
|
|
auto webdriver_socket_path = DeprecatedString::formatted("{}/webdriver", TRY(Core::StandardPaths::runtime_directory()));
|
|
@@ -35,6 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|
TRY(Core::System::unveil("/res", "r"));
|
|
TRY(Core::System::unveil("/res", "r"));
|
|
TRY(Core::System::unveil("/etc/timezone", "r"));
|
|
TRY(Core::System::unveil("/etc/timezone", "r"));
|
|
TRY(Core::System::unveil("/usr/lib", "r"));
|
|
TRY(Core::System::unveil("/usr/lib", "r"));
|
|
|
|
+ TRY(Core::System::unveil("/tmp/session/%sid/portal/audio", "rw"));
|
|
TRY(Core::System::unveil("/tmp/session/%sid/portal/request", "rw"));
|
|
TRY(Core::System::unveil("/tmp/session/%sid/portal/request", "rw"));
|
|
TRY(Core::System::unveil("/tmp/session/%sid/portal/image", "rw"));
|
|
TRY(Core::System::unveil("/tmp/session/%sid/portal/image", "rw"));
|
|
TRY(Core::System::unveil("/tmp/session/%sid/portal/websocket", "rw"));
|
|
TRY(Core::System::unveil("/tmp/session/%sid/portal/websocket", "rw"));
|
|
@@ -44,6 +46,10 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|
Web::Platform::ImageCodecPlugin::install(*new WebContent::ImageCodecPluginSerenity);
|
|
Web::Platform::ImageCodecPlugin::install(*new WebContent::ImageCodecPluginSerenity);
|
|
Web::Platform::FontPlugin::install(*new Web::Platform::FontPluginSerenity);
|
|
Web::Platform::FontPlugin::install(*new Web::Platform::FontPluginSerenity);
|
|
|
|
|
|
|
|
+ Web::Platform::AudioCodecPlugin::install_creation_hook([] {
|
|
|
|
+ return WebContent::AudioCodecPluginSerenity::create();
|
|
|
|
+ });
|
|
|
|
+
|
|
Web::WebSockets::WebSocketClientManager::initialize(TRY(WebView::WebSocketClientManagerAdapter::try_create()));
|
|
Web::WebSockets::WebSocketClientManager::initialize(TRY(WebView::WebSocketClientManagerAdapter::try_create()));
|
|
Web::ResourceLoader::initialize(TRY(WebView::RequestServerAdapter::try_create()));
|
|
Web::ResourceLoader::initialize(TRY(WebView::RequestServerAdapter::try_create()));
|
|
TRY(Web::Bindings::initialize_main_thread_vm());
|
|
TRY(Web::Bindings::initialize_main_thread_vm());
|