mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 22:49:47 +00:00
LibWebView+UI: Generate action to enable/disable DevTools
This commit is contained in:
parent
6d30b0f4d4
commit
14d49d5a3a
Notes:
github-actions[bot]
2025-09-18 11:28:44 +00:00
Author: https://github.com/trflynn89
Commit: 14d49d5a3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6221
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/konradekk
13 changed files with 121 additions and 112 deletions
|
@ -83,6 +83,7 @@ public:
|
|||
Action& open_about_page_action() { return *m_open_about_page_action; }
|
||||
Action& open_processes_page_action() { return *m_open_processes_page_action; }
|
||||
Action& open_settings_page_action() { return *m_open_settings_page_action; }
|
||||
Action& toggle_devtools_action() { return *m_toggle_devtools_action; }
|
||||
Action& view_source_action() { return *m_view_source_action; }
|
||||
|
||||
Menu& zoom_menu() { return *m_zoom_menu; }
|
||||
|
@ -95,11 +96,7 @@ public:
|
|||
|
||||
void apply_view_options(Badge<ViewImplementation>, ViewImplementation&);
|
||||
|
||||
enum class DevtoolsState {
|
||||
Disabled,
|
||||
Enabled,
|
||||
};
|
||||
ErrorOr<DevtoolsState> toggle_devtools_enabled();
|
||||
ErrorOr<void> toggle_devtools_enabled();
|
||||
void refresh_tab_list();
|
||||
|
||||
protected:
|
||||
|
@ -115,6 +112,9 @@ protected:
|
|||
|
||||
virtual Optional<ByteString> ask_user_for_download_folder() const { return {}; }
|
||||
|
||||
virtual void on_devtools_enabled() const;
|
||||
virtual void on_devtools_disabled() const;
|
||||
|
||||
Main::Arguments& arguments() { return m_arguments; }
|
||||
|
||||
private:
|
||||
|
@ -189,6 +189,7 @@ private:
|
|||
RefPtr<Action> m_open_about_page_action;
|
||||
RefPtr<Action> m_open_processes_page_action;
|
||||
RefPtr<Action> m_open_settings_page_action;
|
||||
RefPtr<Action> m_toggle_devtools_action;
|
||||
RefPtr<Action> m_view_source_action;
|
||||
|
||||
RefPtr<Menu> m_zoom_menu;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue