refactor: add NativeWindowViews::SetTitleBarOverlay() (#47126)

* refactor: move SetTitleBarOverlay() impl to NativeWindowViews

* refactor: make NativeWindowViews::set_overlay_button_color() private

refactor: make NativeWindowViews::set_overlay_symbol_color() private

refactor: make NativeWindow::set_titlebar_overlay_height() protected

* refactor: simplify downcasting in NativeWindowViews::SetTitleBarOverlay()
This commit is contained in:
Charles Kerr
2025-05-19 13:19:03 +00:00
committed by GitHub
parent d426667a01
commit 687e50b4f3
4 changed files with 73 additions and 63 deletions

View File

@@ -394,9 +394,6 @@ class NativeWindow : public base::SupportsUserData,
}
int titlebar_overlay_height() const { return titlebar_overlay_height_; }
void set_titlebar_overlay_height(int height) {
titlebar_overlay_height_ = height;
}
bool has_frame() const { return has_frame_; }
@@ -431,6 +428,10 @@ class NativeWindow : public base::SupportsUserData,
void UpdateBackgroundThrottlingState();
protected:
void set_titlebar_overlay_height(int height) {
titlebar_overlay_height_ = height;
}
constexpr void set_has_frame(const bool val) { has_frame_ = val; }
[[nodiscard]] constexpr bool is_closed() const { return is_closed_; }