refactor: remove some NativeWindow public API (#46919)

* refactor: make NativeWindow::titlebar_overlay_height_ private

* refactor: make NativeWindow::set_has_frame() protected

* refactor: remove NativeWindow::background_material()

It's only used once, in NativeWindow, so use |background_material_| directly.

* refactor: remove NativeWindow::vibrancy()

It's only used once, in a NativeWindow method, so use |vibrancy_| directly.

* refactor: unfriend api::BrowserView

It was added in Oct 2022 by 23d4a25 for access to protected NativeWindow
methods add_inspectable_view() and remove_inspectable_view().

That dependency was removed in Nov 2022 by 184ac2b, so BrowserView
doesn't need access to NativeWindow's private fields & methods anymore.

* refactor: make NativeWindow::ContentBoundsToWindowBounds() protected

refactor: make NativeWindow::WindowBoundsToContentBounds() protected
This commit is contained in:
Charles Kerr
2025-05-05 09:28:49 -05:00
committed by GitHub
parent 2e2776611f
commit 3362db0655
2 changed files with 13 additions and 21 deletions

View File

@@ -830,17 +830,14 @@ bool NativeWindow::IsTranslucent() const {
#if BUILDFLAG(IS_MAC)
// Windows with vibrancy set are translucent
if (!vibrancy().empty()) {
if (!vibrancy_.empty())
return true;
}
#endif
#if BUILDFLAG(IS_WIN)
// Windows with certain background materials may be translucent
const std::string& bg_material = background_material();
if (!bg_material.empty() && bg_material != "none") {
if (!background_material_.empty() && background_material_ != "none")
return true;
}
#endif
return false;