mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
Browser+LibWeb+WebContent: Broadcast video element context menu requests
This just sets up the IPC to notify the browser process of context menu requests on video elements. The IPC contains a few pieces of information about the state of the video element.
This commit is contained in:
parent
5f473bcb5f
commit
d8f03dda08
14 changed files with 54 additions and 0 deletions
|
@ -115,6 +115,8 @@ public:
|
|||
void dismiss_dialog();
|
||||
void accept_dialog();
|
||||
|
||||
void did_request_video_context_menu(i32 video_id, CSSPixelPoint, AK::URL const&, DeprecatedString const& target, unsigned modifiers, bool is_playing, bool has_user_agent_controls, bool is_looping);
|
||||
|
||||
bool pdf_viewer_supported() const { return m_pdf_viewer_supported; }
|
||||
|
||||
private:
|
||||
|
@ -143,6 +145,8 @@ private:
|
|||
Optional<bool> m_pending_confirm_response;
|
||||
Optional<Optional<String>> m_pending_prompt_response;
|
||||
|
||||
Optional<int> m_video_context_menu_element_id;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewer-supported
|
||||
// Each user agent has a PDF viewer supported boolean, whose value is implementation-defined (and might vary according to user preferences).
|
||||
// Spec Note: This value also impacts the navigation processing model.
|
||||
|
@ -178,6 +182,7 @@ public:
|
|||
virtual void page_did_request_context_menu(CSSPixelPoint) { }
|
||||
virtual void page_did_request_link_context_menu(CSSPixelPoint, AK::URL const&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
virtual void page_did_request_image_context_menu(CSSPixelPoint, AK::URL const&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers, Gfx::Bitmap const*) { }
|
||||
virtual void page_did_request_video_context_menu(CSSPixelPoint, AK::URL const&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers, [[maybe_unused]] bool is_playing, [[maybe_unused]] bool has_user_agent_controls, [[maybe_unused]] bool is_looping) { }
|
||||
virtual void page_did_click_link(const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
virtual void page_did_middle_click_link(const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
virtual void page_did_enter_tooltip_area(CSSPixelPoint, DeprecatedString const&) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue