mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibWebView: Add do-not-track setting to about:settings
This commit is contained in:
parent
49dae536a7
commit
1be3e7fd8a
Notes:
github-actions[bot]
2025-04-02 18:17:25 +00:00
Author: https://github.com/trflynn89
Commit: 1be3e7fd8a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4194
Reviewed-by: https://github.com/AtkinsSJ
7 changed files with 66 additions and 0 deletions
|
@ -24,6 +24,11 @@ struct SiteSetting {
|
|||
OrderedHashTable<String> site_filters;
|
||||
};
|
||||
|
||||
enum class DoNotTrack {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
class SettingsObserver {
|
||||
public:
|
||||
SettingsObserver();
|
||||
|
@ -33,6 +38,7 @@ public:
|
|||
virtual void search_engine_changed() { }
|
||||
virtual void autocomplete_engine_changed() { }
|
||||
virtual void autoplay_settings_changed() { }
|
||||
virtual void do_not_track_changed() { }
|
||||
};
|
||||
|
||||
class Settings {
|
||||
|
@ -58,6 +64,9 @@ public:
|
|||
void remove_autoplay_site_filter(String const&);
|
||||
void remove_all_autoplay_site_filters();
|
||||
|
||||
DoNotTrack do_not_track() const { return m_do_not_track; }
|
||||
void set_do_not_track(DoNotTrack);
|
||||
|
||||
static void add_observer(Badge<SettingsObserver>, SettingsObserver&);
|
||||
static void remove_observer(Badge<SettingsObserver>, SettingsObserver&);
|
||||
|
||||
|
@ -72,6 +81,7 @@ private:
|
|||
Optional<SearchEngine> m_search_engine;
|
||||
Optional<AutocompleteEngine> m_autocomplete_engine;
|
||||
SiteSetting m_autoplay;
|
||||
DoNotTrack m_do_not_track { DoNotTrack::No };
|
||||
|
||||
Vector<SettingsObserver&> m_observers;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue