refactor: add NativeWindow::SetShape() (#47131)

use NativeWindow::SetShape() in api::BaseWindow
This commit is contained in:
Charles Kerr
2025-05-19 08:29:29 +00:00
committed by GitHub
parent e2f496cfbc
commit 208bbc0504
3 changed files with 7 additions and 2 deletions

View File

@@ -289,6 +289,10 @@ NativeWindow* NativeWindow::FromWidget(const views::Widget* widget) {
widget->GetNativeWindowProperty(kNativeWindowKey.c_str()));
}
void NativeWindow::SetShape(const std::vector<gfx::Rect>& rects) {
widget()->SetShape(std::make_unique<std::vector<gfx::Rect>>(rects));
}
void NativeWindow::SetSize(const gfx::Size& size, bool animate) {
SetBounds(gfx::Rect(GetPosition(), size), animate);
}