autofill: migrate more GetDialogButtonLabel -> set_button_label
This change migrates all the other overrides in //chrome/browser/ui/views/autofill of GetDialogButtonLabel over to set_button_label. Many of these dialogs dynamically compute their label text based on the state of their models/controllers. That causes some difficulty with the "push-based" (client sets properties) design DialogDelegate is migrating to from its existing "pull-based" (DialogDelegate asks client for properties) design. This change migrates: 1) CardUnmaskPromptViews, by adding an UpdateButtonLabels private method to this class that pushes updated label text to DialogDelegate when needed and calling it at every point that DialogModelChanged is called. 2) LocalCardMigrationBubbleViews, which uses a static ok button text. 3) SaveCardBubbleViews, which uses controller-generated text but never updates it in use (no calls to DialogModelChanged) 4) WebAuthnOfferDialogViewImpl, which already has a RefreshContent method, by pushing new button text in that method. Bug: 1011446 Change-Id: Iaf497223e3c44c3a6227e264e40e441f2fbe389f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854689Reviewed-by:Siyu An <siyua@chromium.org> Reviewed-by:
Vasilii Sukhanov <vasilii@chromium.org> Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#706515}
Showing
Please register or sign in to comment