• Christopher Cameron's avatar
    MacPWAs: Create NSAlerts in the appropriate process · ba65d322
    Christopher Cameron authored
    Split the Cocoa-facing parts of JavaScriptAppModalDialogCocoa into a
    separate views_bridge_mac::AlertBridge class, implementing a mojo
    interface of the same name.
    
    The mojo interface has a single method, Show, which has a single
    callback, indicating the disposition of the alert.
    
    Make JavaScriptAppModalDialogCocoa instantiate
    views_bridge_mac::AlertBridge across mojo either in-process or
    out-of-process as needed. Note that this subtly changes the behavior of
    JavaScriptAppModalDialogCocoa::AcceptAppModalDialog in that it will no
    longer attempt to read the dialog's text when programmatically
    quitting (note that this feature may be dead code).
    
    This makes alerts appear in the appropriate process. Note that the
    alerts of PWAs and of Chrome are still interconnected. Only one alert
    may be present at once, and an active alert will take focus from Chrome
    and all PWAs.
    
    Bug: 898604
    Change-Id: I37267cf7aa41d8e68cb2d342a5058e257b2d4385
    Reviewed-on: https://chromium-review.googlesource.com/c/1390757Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Commit-Queue: ccameron <ccameron@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#619812}
    ba65d322
BUILD.gn 1.4 KB