2023-08-01 14:39:19 -06:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-07-30 14:01:05 -04:00
|
|
|
#include <AK/ByteString.h>
|
|
|
|
#include <AK/Optional.h>
|
2024-01-16 18:55:40 +01:00
|
|
|
#include <AK/String.h>
|
2024-07-30 14:01:05 -04:00
|
|
|
#include <AK/Vector.h>
|
|
|
|
#include <LibURL/URL.h>
|
2024-08-01 07:03:03 -04:00
|
|
|
#include <LibWebView/ProcessType.h>
|
2024-01-16 18:55:40 +01:00
|
|
|
|
2024-07-30 14:01:05 -04:00
|
|
|
namespace WebView {
|
|
|
|
|
|
|
|
enum class NewWindow {
|
|
|
|
No,
|
|
|
|
Yes,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class ForceNewProcess {
|
|
|
|
No,
|
|
|
|
Yes,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class AllowPopups {
|
|
|
|
No,
|
|
|
|
Yes,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class DisableSQLDatabase {
|
|
|
|
No,
|
|
|
|
Yes,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ChromeOptions {
|
|
|
|
Vector<URL::URL> urls;
|
|
|
|
Vector<ByteString> raw_urls;
|
|
|
|
URL::URL new_tab_page_url;
|
|
|
|
Vector<ByteString> certificates {};
|
|
|
|
NewWindow new_window { NewWindow::No };
|
|
|
|
ForceNewProcess force_new_process { ForceNewProcess::No };
|
|
|
|
AllowPopups allow_popups { AllowPopups::No };
|
|
|
|
DisableSQLDatabase disable_sql_database { DisableSQLDatabase::No };
|
2024-08-01 07:03:03 -04:00
|
|
|
Optional<ProcessType> debug_helper_process {};
|
2024-08-01 07:13:09 -04:00
|
|
|
Optional<ProcessType> profile_helper_process {};
|
2024-07-30 14:01:05 -04:00
|
|
|
Optional<ByteString> webdriver_content_ipc_path {};
|
|
|
|
};
|
2023-08-02 11:52:59 -06:00
|
|
|
|
2023-12-01 12:18:40 -05:00
|
|
|
enum class IsLayoutTestMode {
|
|
|
|
No,
|
2024-07-30 14:01:05 -04:00
|
|
|
Yes,
|
2023-12-01 12:18:40 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class UseLagomNetworking {
|
|
|
|
No,
|
2024-07-30 14:01:05 -04:00
|
|
|
Yes,
|
2023-12-01 12:18:40 -05:00
|
|
|
};
|
|
|
|
|
2024-04-16 08:02:41 +02:00
|
|
|
enum class LogAllJSExceptions {
|
|
|
|
No,
|
2024-07-30 14:01:05 -04:00
|
|
|
Yes,
|
2024-04-16 08:02:41 +02:00
|
|
|
};
|
|
|
|
|
2024-04-16 14:39:57 +02:00
|
|
|
enum class EnableIDLTracing {
|
|
|
|
No,
|
2024-07-30 14:01:05 -04:00
|
|
|
Yes,
|
2024-04-16 14:39:57 +02:00
|
|
|
};
|
|
|
|
|
2024-06-22 18:53:11 +02:00
|
|
|
enum class EnableHTTPCache {
|
|
|
|
No,
|
2024-07-30 14:01:05 -04:00
|
|
|
Yes,
|
2024-06-22 18:53:11 +02:00
|
|
|
};
|
|
|
|
|
2024-04-21 08:46:38 +12:00
|
|
|
enum class ExposeInternalsObject {
|
|
|
|
No,
|
2024-07-30 14:01:05 -04:00
|
|
|
Yes,
|
2024-04-21 08:46:38 +12:00
|
|
|
};
|
|
|
|
|
2023-12-01 12:18:40 -05:00
|
|
|
struct WebContentOptions {
|
2024-01-16 18:55:40 +01:00
|
|
|
String command_line;
|
|
|
|
String executable_path;
|
2024-07-16 18:52:12 +02:00
|
|
|
Optional<ByteString> config_path {};
|
2023-12-01 12:18:40 -05:00
|
|
|
IsLayoutTestMode is_layout_test_mode { IsLayoutTestMode::No };
|
2024-04-25 07:18:31 -04:00
|
|
|
UseLagomNetworking use_lagom_networking { UseLagomNetworking::Yes };
|
2024-04-16 08:02:41 +02:00
|
|
|
LogAllJSExceptions log_all_js_exceptions { LogAllJSExceptions::No };
|
2024-04-16 14:39:57 +02:00
|
|
|
EnableIDLTracing enable_idl_tracing { EnableIDLTracing::No };
|
2024-06-22 18:53:11 +02:00
|
|
|
EnableHTTPCache enable_http_cache { EnableHTTPCache::No };
|
2024-04-21 08:46:38 +12:00
|
|
|
ExposeInternalsObject expose_internals_object { ExposeInternalsObject::No };
|
2023-12-01 12:18:40 -05:00
|
|
|
};
|
|
|
|
|
2023-08-02 11:52:59 -06:00
|
|
|
}
|