mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibWebView+WebContent+UI: Remember the current system visibility state
We will want to re-inform WebContent of the system visibility state when we create a new process after a crash. This changes the IPC to just send the enum value directly, instead of a boolean, so that we can just store that enum value directly on the ViewImplementation class.
This commit is contained in:
parent
c04b14d0cb
commit
83b1db785a
Notes:
github-actions[bot]
2024-11-13 19:37:50 +00:00
Author: https://github.com/trflynn89
Commit: 83b1db785a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2318
11 changed files with 28 additions and 24 deletions
|
@ -92,6 +92,12 @@ void ViewImplementation::did_update_window_rect()
|
|||
client().async_did_update_window_rect(m_client_state.page_index);
|
||||
}
|
||||
|
||||
void ViewImplementation::set_system_visibility_state(Web::HTML::VisibilityState visibility_state)
|
||||
{
|
||||
m_system_visibility_state = visibility_state;
|
||||
client().async_set_system_visibility_state(m_client_state.page_index, m_system_visibility_state);
|
||||
}
|
||||
|
||||
void ViewImplementation::load(URL::URL const& url)
|
||||
{
|
||||
m_url = url;
|
||||
|
|
|
@ -54,6 +54,8 @@ public:
|
|||
void set_window_size(Gfx::IntSize);
|
||||
void did_update_window_rect();
|
||||
|
||||
void set_system_visibility_state(Web::HTML::VisibilityState);
|
||||
|
||||
void load(URL::URL const&);
|
||||
void load_html(StringView);
|
||||
void load_empty_document();
|
||||
|
@ -293,6 +295,8 @@ protected:
|
|||
RefPtr<Core::Promise<LexicalPath>> m_pending_screenshot;
|
||||
RefPtr<Core::Promise<String>> m_pending_info_request;
|
||||
|
||||
Web::HTML::VisibilityState m_system_visibility_state { Web::HTML::VisibilityState::Hidden };
|
||||
|
||||
Web::HTML::AudioPlayState m_audio_play_state { Web::HTML::AudioPlayState::Paused };
|
||||
size_t m_number_of_elements_playing_audio { 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue