ladybird/Userland/Services/WebContent/WebContentClient.ipc
Timothy Flynn 108521a566 LibWeb+LibWebView+WebContent: Implement more <input type=file> behavior
We had previous implemented some plumbing for file input elements in
commit 636602a54e.

This implements the return path for chromes to inform WebContent of the
file(s) the user selected. This patch includes a dummy implementation
for headless-browser to enable testing.
2024-02-26 14:18:49 +01:00

97 lines
6.0 KiB
Plaintext

#include <AK/URL.h>
#include <LibCore/AnonymousBuffer.h>
#include <LibGfx/Color.h>
#include <LibGfx/ShareableBitmap.h>
#include <LibWeb/Cookie/Cookie.h>
#include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/CSS/Selector.h>
#include <LibWeb/HTML/ActivateTab.h>
#include <LibWeb/HTML/SelectedFile.h>
#include <LibWeb/HTML/SelectItem.h>
#include <LibWeb/HTML/WebViewHints.h>
#include <LibWeb/Page/Page.h>
#include <LibWebView/Attribute.h>
#include <LibWebView/SocketPair.h>
endpoint WebContentClient
{
did_start_loading(u64 page_id, URL url, bool is_redirect) =|
did_finish_loading(u64 page_id, URL url) =|
did_request_navigate_back(u64 page_id) =|
did_request_navigate_forward(u64 page_id) =|
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, i32 cursor_type) =|
did_layout(u64 page_id, Gfx::IntSize content_size) =|
did_change_title(u64 page_id, ByteString title) =|
did_request_scroll(u64 page_id, i32 x_delta, i32 y_delta) =|
did_request_scroll_to(u64 page_id, Gfx::IntPoint scroll_position) =|
did_enter_tooltip_area(u64 page_id, Gfx::IntPoint content_position, ByteString title) =|
did_leave_tooltip_area(u64 page_id) =|
did_hover_link(u64 page_id, URL url) =|
did_unhover_link(u64 page_id) =|
did_click_link(u64 page_id, URL url, ByteString target, unsigned modifiers) =|
did_middle_click_link(u64 page_id, 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, ByteString target, unsigned modifiers) =|
did_request_image_context_menu(u64 page_id, Gfx::IntPoint content_position, URL url, ByteString target, unsigned modifiers, 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, ByteString source) =|
did_inspect_dom_tree(u64 page_id, ByteString dom_tree) =|
did_inspect_dom_node(u64 page_id, bool has_style, ByteString computed_style, ByteString resolved_style, ByteString custom_properties, ByteString node_box_sizing, ByteString aria_properties_state) =|
did_inspect_accessibility_tree(u64 page_id, ByteString accessibility_tree) =|
did_get_hovered_node_id(u64 page_id, i32 node_id) =|
did_finish_editing_dom_node(u64 page_id, Optional<i32> node_id) =|
did_get_dom_node_html(u64 page_id, String html) =|
did_take_screenshot(u64 page_id, Gfx::ShareableBitmap screenshot) =|
did_change_favicon(u64 page_id, Gfx::ShareableBitmap favicon) =|
did_request_all_cookies(u64 page_id, URL url) => (Vector<Web::Cookie::Cookie> cookies)
did_request_named_cookie(u64 page_id, URL url, String name) => (Optional<Web::Cookie::Cookie> cookie)
did_request_cookie(u64 page_id, URL url, Web::Cookie::Source source) => (String cookie)
did_set_cookie(u64 page_id, URL url, Web::Cookie::ParsedCookie cookie, Web::Cookie::Source source) => ()
did_update_cookie(u64 page_id, Web::Cookie::Cookie cookie) =|
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) => (Gfx::IntPoint window_position)
did_request_resize_window(u64 page_id, Gfx::IntSize size) => (Gfx::IntSize window_size)
did_request_maximize_window(u64 page_id) => (Gfx::IntRect window_rect)
did_request_minimize_window(u64 page_id) => (Gfx::IntRect window_rect)
did_request_fullscreen_window(u64 page_id) => (Gfx::IntRect window_rect)
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::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, bool event_was_accepted) =|
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_output_js_console_message(u64 page_id, i32 message_index) =|
did_get_js_console_messages(u64 page_id, i32 start_index, Vector<ByteString> message_types, Vector<ByteString> messages) =|
did_finish_text_test(u64 page_id) =|
request_worker_agent(u64 page_id) => (WebView::SocketPair sockets) // FIXME: Add required attributes to select a SharedWorker Agent
inspector_did_load(u64 page_id) =|
inspector_did_select_dom_node(u64 page_id, i32 node_id, Optional<Web::CSS::Selector::PseudoElement::Type> pseudo_element) =|
inspector_did_set_dom_node_text(u64 page_id, i32 node_id, String text) =|
inspector_did_set_dom_node_tag(u64 page_id, i32 node_id, String tag) =|
inspector_did_add_dom_node_attributes(u64 page_id, i32 node_id, Vector<WebView::Attribute> attributes) =|
inspector_did_replace_dom_node_attribute(u64 page_id, i32 node_id, size_t attribute_index, Vector<WebView::Attribute> replacement_attributes) =|
inspector_did_request_dom_tree_context_menu(u64 page_id, i32 node_id, Gfx::IntPoint position, String type, Optional<String> tag, Optional<size_t> attribute_index) =|
inspector_did_execute_console_script(u64 page_id, String script) =|
}