ash: modernize Views use in InSessionAuthDialog
This change: 1) Removes AuthDialogWidgetDelegate in favor of setters on the base WidgetDelegate class 2) Removes InSessionAuthDialog::contents_view_ in favor of storing the auth methods (which are the only thing it is used for) directly as a const member var 3) Simplifies construction of the auth dialog widget 4) Removes a couple of redundant calls to set bounds on the Widget (4) deserves more explanation: Before this change, CreateAuthDialogWidget() set the Widget's initial bounds to kDefaultSize centered within the primary display, then InSessionAuthDialog set the bounds again to change the height to the contents view's preferred height. The first bounds set should be unnecessary because system modals (which this is) are centered in the screen. The second bounds set should also be unnecessary because a widget's default size is its contents view's size. Therefore, what this code actually accomplishes is to set the width of the widget to 340. This value is at odds with AuthDialogContentsView's actual preferred width, which I believe is 512. After this change, the widget's bounds are not set, nor is its size; it is allowed to size itself to the size of its contents view, as widgets normally do. This will make the InSessionAuthDialog large enough to display its entire contents view, which may cause a visual change. Bug: 1075649 Change-Id: Ib7e972dba773ea3bf887d774fab328cbb306faad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441963Reviewed-by:Peter Kasting <pkasting@chromium.org> Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org> Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#813831}
Showing
Please register or sign in to comment