mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09: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
|
@ -49,9 +49,9 @@ public:
|
|||
void confirm_closed(bool accepted);
|
||||
void prompt_closed(Optional<String> response);
|
||||
|
||||
Web::WebIDL::ExceptionOr<void> toggle_video_play_state();
|
||||
Web::WebIDL::ExceptionOr<void> toggle_video_loop_state();
|
||||
Web::WebIDL::ExceptionOr<void> toggle_video_controls_state();
|
||||
Web::WebIDL::ExceptionOr<void> toggle_media_play_state();
|
||||
Web::WebIDL::ExceptionOr<void> toggle_media_loop_state();
|
||||
Web::WebIDL::ExceptionOr<void> toggle_media_controls_state();
|
||||
|
||||
[[nodiscard]] Gfx::Color background_color() const;
|
||||
|
||||
|
@ -98,7 +98,7 @@ private:
|
|||
virtual void page_did_request_dismiss_dialog() override;
|
||||
virtual void page_did_change_favicon(Gfx::Bitmap const&) override;
|
||||
virtual void page_did_request_image_context_menu(Web::CSSPixelPoint, const URL&, DeprecatedString const& target, unsigned modifiers, Gfx::Bitmap const*) override;
|
||||
virtual void page_did_request_video_context_menu(Web::CSSPixelPoint, const URL&, DeprecatedString const& target, unsigned modifiers, bool is_playing, bool has_user_agent_controls, bool is_looping) override;
|
||||
virtual void page_did_request_media_context_menu(Web::CSSPixelPoint, DeprecatedString const& target, unsigned modifiers, Web::Page::MediaContextMenu) override;
|
||||
virtual Vector<Web::Cookie::Cookie> page_did_request_all_cookies(URL const&) override;
|
||||
virtual Optional<Web::Cookie::Cookie> page_did_request_named_cookie(URL const&, DeprecatedString const&) override;
|
||||
virtual DeprecatedString page_did_request_cookie(const URL&, Web::Cookie::Source) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue