MacPWAs: Create NSAlerts in the appropriate process
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:Robert Sesek <rsesek@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#619812}
Showing
This diff is collapsed.
ui/views_bridge_mac/alert.h
0 → 100644
ui/views_bridge_mac/alert.mm
0 → 100644
This diff is collapsed.
Please register or sign in to comment