ladybird/Libraries/LibWebView/Utilities.h
Andreas Kling 164ed80244 Meta: Enable exit-time destructor warnings for libraries
Enable -Wexit-time-destructors for all in-tree library targets and
update process-lifetime library statics so they no longer register
exit-time destructors. Long-lived caches, lookup tables, singleton
registries, and generated constants now use NeverDestroyed or leaked
references where the data is intended to live until process exit.

Update LibWeb, LibLine, and the binding generators so regenerated
sources follow the same rule instead of reintroducing destructed
statics.
2026-06-04 19:20:49 +02:00

36 lines
1.2 KiB
C++

/*
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/ByteString.h>
#include <AK/Error.h>
#include <AK/String.h>
#include <AK/Types.h>
#include <AK/Vector.h>
#include <LibWeb/Forward.h>
#include <LibWebView/Forward.h>
namespace WebView {
WEBVIEW_API void platform_init(Optional<ByteString> ladybird_binary_path = {});
WEBVIEW_API void copy_default_config_files(StringView config_path);
WEBVIEW_API ErrorOr<Vector<ByteString>> get_paths_for_helper_process(StringView process_name);
WEBVIEW_API extern ByteString& s_ladybird_resource_root;
WEBVIEW_API Optional<ByteString const&> mach_server_name();
WEBVIEW_API void set_mach_server_name(ByteString name);
WEBVIEW_API ByteString mach_server_name_for_process(StringView process_name, pid_t pid);
WEBVIEW_API ErrorOr<void> handle_attached_debugger();
WEBVIEW_API ErrorOr<Web::HTML::SelectedFile> create_selected_file(ByteString const&);
ErrorOr<JsonObject> read_json_file(ByteString const& path);
ErrorOr<void> write_json_file(ByteString const& path, JsonValue const& value);
}