Descriptioncros: Defer file selection callback until the window closes.
We've had lots of trouble over the last six months with the ChromeOS extension-based file picker. In particular, for the Windows/Mac/GTK file pickers selecting a file is synchronous with closing the dialog. On ChromeOS, with the extension picker, it's not. We've historically gotten into trouble with the order of deletion of all the associated objects. This patch defers the SelectFileDialog::Listener callback until the dialog closes, to match the semantics of Win/Mac/GTK. This allows us to use a more natural window.close() call in the file manager JavaScript, though sadly we still have to call the unload handler manually. I also renamed ExtensionDialogIsClosing() to ExtensionDialogClosing() to match WindowClosing().
This also fixed a problem on Aura where closing the file picker by clicking the dialog "X" button resulted in the inability to reopen it.
BUG=105311
TEST=browser_test SelectFileDialog*, also navigate to a web page with <input type='file'> and be sure you can cancel with the 'X' button on Aura and reopen the dialog.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112776
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|