views: have WidgetDelegate update widget size constraints
Currently clients of the SetCan{Maximize,Minimize,Resize} setters need to remember to call Widget::OnSizeConstraintsChanged afterwards, which is obviously dangerous. Just call it from inside the setters, and then we can stop calling it everywhere else. OnSizeConstraintsChanged is idempotent (though a bit expensive) so temporarily having two calls to it won't hurt anything. This change also fixes ViewEventTestBase::GetWidget() to tolerate being called early in the object's lifecycle. Bug: 1075649 Change-Id: I11dcf39e6b1ad86f8d5f5adfa973e5fd339dd36f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485195 Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by:Peter Boström <pbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#819017}
Showing
Please register or sign in to comment