Descriptionchromeos: Run beforeunload handlers when closing panels.
When a panel content window has a beforeunload handler, we'd
previously close its titlebar (which would cause the window
manager to also hide the content window in anticipation of
it being closed too), but then leave the content window
mapped and open a modal dialog (which would be kept
invisible by the window manager). This would effectively
freeze the UI unless the user happened to press the Escape
key, which would still leave us in a state where we'd end up
restoring the panel again the next time the session was
restored.
This change makes us instead call BrowserView::CanClose()
first and avoid closing the panel if we're not supposed to.
BUG=chromium-os:10910
TEST=went to air1.com/listen and checked that i get an alert when closing the panel with "leave this page" and "stay on this page" buttons that function as expected
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71363
Patch Set 1 #
Total comments: 2
Messages
Total messages: 5 (0 generated)
|