• Peter Boström's avatar
    Call back directly from DialogModelHost to fields · 274d2c72
    Peter Boström authored
    Replaces methods like DialogModel::OnButtonPressed() with
    DialogModelButton::OnPressed(), so that those calls from DialogModelHost
    don't have to go through DialogModel.
    
    This also makes the callback for DialogModelButton mandatory and removes
    it from Params. The dialog buttons OK and Cancel are the exceptions that
    don't need one and use a NOTREACHED() lambda.
    
    The change also adds util::PassKey<DialogModelHost> to additional
    DialogModelField methods to narrow the public API from methods that are
    unnecessary for public consumption.
    
    Bug: 1106422
    Change-Id: I8f50e1ce48b2862fce3be5054d6c788c41846f53
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354637
    Commit-Queue: Peter Boström <pbos@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#798356}
    274d2c72
dialog_model.cc 6.03 KB