Files
ladybird/Services/WebContent/WebContentClient.ipc
Timothy Flynn b169a98495 LibWeb+LibWebView+WebContent: Introduce a basic about:settings page
This adds a basic settings page to manage persistent Ladybird settings.
As a first pass, this exposes settings for the new tab page URL and the
default search engine.

The way the search engine option works is that once search is enabled,
the user must choose their default search engine; we do not apply any
default automatically. Search remains disabled until this is done.

There are a couple of improvements that we should make here:

* Settings changes are not broadcasted to all open about:settings pages.
  So if two instances are open, and the user changes the search engine
  in one instance, the other instance will have a stale UI.

* Adding an IPC per setting is going to get annoying. It would be nice
  if we can come up with a smaller set of IPCs to send only the relevant
  changed settings.
2025-03-22 17:27:45 +01:00

121 lines
6.8 KiB
Plaintext

#include <LibCore/AnonymousBuffer.h>
#include <LibGfx/Color.h>
#include <LibGfx/Cursor.h>
#include <LibGfx/ShareableBitmap.h>
#include <LibURL/URL.h>
#include <LibWeb/Cookie/Cookie.h>
#include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/CSS/Selector.h>
#include <LibWeb/CSS/StyleSheetIdentifier.h>
#include <LibWeb/HTML/ActivateTab.h>
#include <LibWeb/HTML/AudioPlayState.h>
#include <LibWeb/HTML/FileFilter.h>
#include <LibWeb/HTML/SelectedFile.h>
#include <LibWeb/HTML/SelectItem.h>
#include <LibWeb/HTML/WebViewHints.h>
#include <LibWeb/Page/EventResult.h>
#include <LibWeb/Page/Page.h>
#include <LibWebView/Attribute.h>
#include <LibWebView/ConsoleOutput.h>
#include <LibWebView/DOMNodeProperties.h>
#include <LibWebView/Mutation.h>
#include <LibWebView/PageInfo.h>
#include <LibWebView/ProcessHandle.h>
endpoint WebContentClient
{
did_request_new_process_for_navigation(u64 page_id, URL::URL url) =|
did_start_loading(u64 page_id, URL::URL url, bool is_redirect) =|
did_finish_loading(u64 page_id, URL::URL url) =|
did_request_refresh(u64 page_id) =|
did_paint(u64 page_id, Gfx::IntRect content_rect, i32 bitmap_id) =|
did_request_cursor_change(u64 page_id, Gfx::Cursor cursor) =|
did_change_title(u64 page_id, ByteString title) =|
did_change_url(u64 page_id, URL::URL url) =|
did_request_tooltip_override(u64 page_id, Gfx::IntPoint position, ByteString title) =|
did_stop_tooltip_override(u64 page_id) =|
did_enter_tooltip_area(u64 page_id, ByteString title) =|
did_leave_tooltip_area(u64 page_id) =|
did_hover_link(u64 page_id, URL::URL url) =|
did_unhover_link(u64 page_id) =|
did_click_link(u64 page_id, URL::URL url, ByteString target, unsigned modifiers) =|
did_middle_click_link(u64 page_id, URL::URL url, ByteString target, unsigned modifiers) =|
did_request_context_menu(u64 page_id, Gfx::IntPoint content_position) =|
did_request_link_context_menu(u64 page_id, Gfx::IntPoint content_position, URL::URL url, ByteString target, unsigned modifiers) =|
did_request_image_context_menu(u64 page_id, Gfx::IntPoint content_position, URL::URL url, ByteString target, unsigned modifiers, Optional<Gfx::ShareableBitmap> bitmap) =|
did_request_media_context_menu(u64 page_id, Gfx::IntPoint content_position, ByteString target, unsigned modifiers, Web::Page::MediaContextMenu menu) =|
did_request_alert(u64 page_id, String message) =|
did_request_confirm(u64 page_id, String message) =|
did_request_prompt(u64 page_id, String message, String default_) =|
did_request_set_prompt_text(u64 page_id, String message) =|
did_request_accept_dialog(u64 page_id) =|
did_request_dismiss_dialog(u64 page_id) =|
did_get_source(u64 page_id, URL::URL url, URL::URL base_url, String source) =|
did_inspect_dom_tree(u64 page_id, String dom_tree) =|
did_inspect_dom_node(u64 page_id, WebView::DOMNodeProperties properties) =|
did_inspect_accessibility_tree(u64 page_id, String accessibility_tree) =|
did_get_hovered_node_id(u64 page_id, Web::UniqueNodeID node_id) =|
did_finish_editing_dom_node(u64 page_id, Optional<Web::UniqueNodeID> node_id) =|
did_mutate_dom(u64 page_id, WebView::Mutation mutation) =|
did_get_dom_node_html(u64 page_id, String html) =|
did_list_style_sheets(u64 page_id, Vector<Web::CSS::StyleSheetIdentifier> style_sheets) =|
did_get_style_sheet_source(u64 page_id, Web::CSS::StyleSheetIdentifier identifier, URL::URL base_url, String source) =|
did_take_screenshot(u64 page_id, Gfx::ShareableBitmap screenshot) =|
did_get_internal_page_info(u64 page_id, WebView::PageInfoType type, String info) =|
did_change_favicon(u64 page_id, Gfx::ShareableBitmap favicon) =|
did_request_all_cookies(URL::URL url) => (Vector<Web::Cookie::Cookie> cookies)
did_request_named_cookie(URL::URL url, String name) => (Optional<Web::Cookie::Cookie> cookie)
did_request_cookie(URL::URL url, Web::Cookie::Source source) => (String cookie)
did_set_cookie(URL::URL url, Web::Cookie::ParsedCookie cookie, Web::Cookie::Source source) => ()
did_update_cookie(Web::Cookie::Cookie cookie) =|
did_expire_cookies_with_time_offset(AK::Duration offset) =|
did_update_resource_count(u64 page_id, i32 count_waiting) =|
did_request_new_web_view(u64 page_id, Web::HTML::ActivateTab activate_tab, Web::HTML::WebViewHints hints, Optional<u64> page_index) => (String handle)
did_request_activate_tab(u64 page_id) =|
did_close_browsing_context(u64 page_id) =|
did_request_restore_window(u64 page_id) =|
did_request_reposition_window(u64 page_id, Gfx::IntPoint position) =|
did_request_resize_window(u64 page_id, Gfx::IntSize size) =|
did_request_maximize_window(u64 page_id) =|
did_request_minimize_window(u64 page_id) =|
did_request_fullscreen_window(u64 page_id) =|
did_request_file(u64 page_id, ByteString path, i32 request_id) =|
did_request_color_picker(u64 page_id, Color current_color) =|
did_request_file_picker(u64 page_id, Web::HTML::FileFilter accepted_file_types, Web::HTML::AllowMultipleFiles allow_multiple_files) =|
did_request_select_dropdown(u64 page_id, Gfx::IntPoint content_position, i32 minimum_width, Vector<Web::HTML::SelectItem> items) =|
did_finish_handling_input_event(u64 page_id, Web::EventResult event_result) =|
did_change_theme_color(u64 page_id, Gfx::Color color) =|
did_insert_clipboard_entry(u64 page_id, String data, String presentation_style, String mime_type) =|
did_update_navigation_buttons_state(u64 page_id, bool back_enabled, bool forward_enabled) =|
did_allocate_backing_stores(u64 page_id, i32 front_bitmap_id, Gfx::ShareableBitmap front_bitmap, i32 back_bitmap_id, Gfx::ShareableBitmap back_bitmap) =|
did_change_audio_play_state(u64 page_id, Web::HTML::AudioPlayState play_state) =|
did_execute_js_console_input(u64 page_id, JsonValue result) =|
did_output_js_console_message(u64 page_id, i32 message_index) =|
did_get_styled_js_console_messages(u64 page_id, i32 start_index, Vector<String> message_types, Vector<String> messages) =|
did_get_unstyled_js_console_messages(u64 page_id, i32 start_index, Vector<WebView::ConsoleOutput> console_output) =|
did_finish_test(u64 page_id, String text) =|
did_set_test_timeout(u64 page_id, double milliseconds) =|
did_set_browser_zoom(u64 page_id, double factor) =|
did_find_in_page(u64 page_id, size_t current_match_index, Optional<size_t> total_match_count) =|
request_worker_agent(u64 page_id) => (IPC::File socket) // FIXME: Add required attributes to select a SharedWorker Agent
update_process_statistics(u64 page_id) =|
request_current_settings(u64 page_id) =|
restore_default_settings(u64 page_id) =|
set_new_tab_page_url(u64 page_id, URL::URL new_tab_page_url) =|
request_available_search_engines(u64 page_id) =|
set_search_engine(u64 page_id, Optional<String> search_engine) =|
}