mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
Ladybird+LibWeb+WebContent: Generalize video context menus for all media
The data we want to send out of the WebContent process is identical for audio and video elements. Rather than just duplicating all of this for audio, generalize the names used for this IPC for all media elements. This also encapsulates that data into a struct. This makes adding new fields to be sent much easier (such as an upcoming field for muting the element).
This commit is contained in:
parent
e81abbde7b
commit
14ca04de25
17 changed files with 198 additions and 147 deletions
|
@ -74,9 +74,9 @@ public:
|
|||
void js_console_input(DeprecatedString const& js_source);
|
||||
void js_console_request_messages(i32 start_index);
|
||||
|
||||
void toggle_video_play_state();
|
||||
void toggle_video_loop_state();
|
||||
void toggle_video_controls_state();
|
||||
void toggle_media_play_state();
|
||||
void toggle_media_loop_state();
|
||||
void toggle_media_controls_state();
|
||||
|
||||
enum class ScreenshotType {
|
||||
Visible,
|
||||
|
@ -90,7 +90,7 @@ public:
|
|||
Function<void(Gfx::IntPoint screen_position)> on_context_menu_request;
|
||||
Function<void(const AK::URL&, Gfx::IntPoint screen_position)> on_link_context_menu_request;
|
||||
Function<void(const AK::URL&, Gfx::IntPoint screen_position, Gfx::ShareableBitmap const&)> on_image_context_menu_request;
|
||||
Function<void(const AK::URL&, Gfx::IntPoint screen_position, bool, bool, bool)> on_video_context_menu_request;
|
||||
Function<void(Gfx::IntPoint screen_position, Web::Page::MediaContextMenu const&)> on_media_context_menu_request;
|
||||
Function<void(const AK::URL&)> on_link_hover;
|
||||
Function<void()> on_link_unhover;
|
||||
Function<void(const AK::URL&, DeprecatedString const& target, unsigned modifiers)> on_link_click;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue