mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
The idea with the UI here is that it will serve as a generic component for all site settings, such as autoplay, notifications, etc. When the site settings dialog is opened, it is filled with the requested setting data, and messages sent to the browser process are based on the setting. This patch only implements the UI and persisted settings. It does not apply autoplay changes to the WebContent process.
31 lines
785 B
C++
31 lines
785 B
C++
/*
|
|
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWebView/WebUI.h>
|
|
|
|
namespace WebView {
|
|
|
|
class SettingsUI : public WebUI {
|
|
WEB_UI(SettingsUI);
|
|
|
|
private:
|
|
virtual void register_interfaces() override;
|
|
|
|
void load_current_settings();
|
|
void restore_default_settings();
|
|
void set_new_tab_page_url(JsonValue const&);
|
|
void load_available_search_engines();
|
|
void set_search_engine(JsonValue const&);
|
|
void load_forcibly_enabled_site_settings();
|
|
void set_site_setting_enabled_globally(JsonValue const&);
|
|
void add_site_setting_filter(JsonValue const&);
|
|
void remove_site_setting_filter(JsonValue const&);
|
|
void remove_all_site_setting_filters(JsonValue const&);
|
|
};
|
|
|
|
}
|