refactor: remove unused web contents preferences methods (#42970)

* chore: remove unused WebContentsPreferences::ShouldDisableDialogs()

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: remove unused WebContentsPreferences::ShouldUseSafeDialogs()

caller removed in 85bc005c

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: remove unused WebContentsPreferences::GetSafeDialogsMessage()

caller removed in 85bc005c

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: WebContentsPreferences::GetPreloadPath() now returns a std::optional<base::FilePath>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: make WebContentsPreferences::last_preference() const

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-07-22 10:45:27 +02:00 committed by GitHub
parent 860f09beab
commit d8949a4d04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 25 deletions

View file

@ -52,7 +52,7 @@ class WebContentsPreferences
void OverrideWebkitPrefs(blink::web_pref::WebPreferences* prefs,
blink::RendererPreferences* renderer_prefs);
base::Value* last_preference() { return &last_web_preferences_; }
const base::Value* last_preference() const { return &last_web_preferences_; }
bool IsOffscreen() const { return offscreen_; }
std::optional<SkColor> GetBackgroundColor() const {
@ -75,12 +75,9 @@ class WebContentsPreferences
bool AllowsNodeIntegrationInSubFrames() const {
return node_integration_in_sub_frames_;
}
bool ShouldDisableDialogs() const { return disable_dialogs_; }
bool ShouldUseSafeDialogs() const { return safe_dialogs_; }
bool GetSafeDialogsMessage(std::string* message) const;
bool ShouldDisablePopups() const { return disable_popups_; }
bool IsWebSecurityEnabled() const { return web_security_; }
bool GetPreloadPath(base::FilePath* path) const;
std::optional<base::FilePath> GetPreloadPath() const { return preload_path_; }
bool IsSandboxed() const;
private: