1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:57:36 +00:00

Browser: Store default config values in a single place

Note that this fixes contradictory default values for group
"Preferences", key "Home". This is exactly the kind of errors I want to
prevent with this new style.

The hope is that this can later be used to:
- verify that all accesses to the same key use the same default value,
- and extract the default values more easily.
This commit is contained in:
Ben Wiederhake 2023-06-01 14:21:06 +02:00 committed by Jelle Raaijmakers
parent 9ee098b119
commit 2420effa7d
8 changed files with 55 additions and 37 deletions

View file

@ -0,0 +1,22 @@
/*
* Copyright (c) 2023, Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/StringView.h>
namespace Browser {
static constexpr StringView default_homepage_url = "file:///res/html/misc/welcome.html"sv;
static constexpr StringView default_new_tab_url = "file:///res/html/misc/new-tab.html"sv;
static constexpr StringView default_search_engine = ""sv;
static constexpr StringView default_color_scheme = "auto"sv;
static constexpr bool default_enable_content_filters = true;
static constexpr bool default_show_bookmarks_bar = true;
static constexpr bool default_close_download_widget_on_finish = false;
static constexpr bool default_allow_autoplay_on_all_websites = false;
}