Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Issue 8770028: cros: Defer file selection callback until the window closes. (Closed)

Created:
9 years ago by James Cook
Modified:
9 years ago
Reviewers:
rginda, bshe
CC:
bshe, flackr
Visibility:
Public.

Description

cros: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -55 lines) Patch
M chrome/browser/resources/file_manager/js/file_manager.js View 1 chunk +9 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_dialog.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/extensions/extension_dialog_observer.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/select_file_dialog_extension.h View 5 chunks +18 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/select_file_dialog_extension.cc View 9 chunks +47 lines, -32 lines 0 comments Download
M chrome/browser/ui/webui/bookmark_all_tabs_dialog.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/html_dialog_ui.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
James Cook
Robert, PTAL. bshe - no need to review, this is just FYI. It seems to ...
9 years ago (2011-12-01 23:35:56 UTC) #1
bshe
Thanks James! +flackr FYI
9 years ago (2011-12-02 17:16:13 UTC) #2
rginda
LGTM
9 years ago (2011-12-02 18:28:01 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamescook@chromium.org/8770028/1
9 years ago (2011-12-02 18:40:57 UTC) #4
commit-bot: I haz the power
9 years ago (2011-12-02 20:51:54 UTC) #5
Change committed as 112776

Powered by Google App Engine
This is Rietveld 408576698