refactor: migrate to View::AddChildView(std::unique_ptr<ui::View*>) (#46474)

* refactor: use AddChildView(std::unique_ptr<View>) in OpaqueFrameView::CreateButton()

Xref: https://issues.chromium.org/issues/40485510

* refactor: use AddChildView(std::unique_ptr<View>) in MenuBar::RebuildChildren()

* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux labels

* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux buttons

* refactor: use AddChildView(std::unique_ptr<View>) in AutofillPopupView

* refactor: use AddChildViewRaw() to flag the edge cases that we still need to fix

* chore: use west coast const for consistency
This commit is contained in:
Charles Kerr 2025-04-07 09:20:46 -05:00 committed by GitHub
parent a6875c732c
commit 85dce12be3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 30 additions and 32 deletions

View file

@ -67,11 +67,11 @@ class WinCaptionButtonContainer : public views::View,
void OnWidgetBoundsChanged(views::Widget* widget,
const gfx::Rect& new_bounds) override;
raw_ptr<WinFrameView> const frame_view_;
raw_ptr<WinCaptionButton> const minimize_button_;
raw_ptr<WinCaptionButton> const maximize_button_;
raw_ptr<WinCaptionButton> const restore_button_;
raw_ptr<WinCaptionButton> const close_button_;
const raw_ptr<WinFrameView> frame_view_;
const raw_ptr<WinCaptionButton> minimize_button_;
const raw_ptr<WinCaptionButton> maximize_button_;
const raw_ptr<WinCaptionButton> restore_button_;
const raw_ptr<WinCaptionButton> close_button_;
base::ScopedObservation<views::Widget, views::WidgetObserver>
widget_observation_{this};