SelectFileDialogExtension should be non-modal when the caller specifies owning_window=NULL
USE CASE: Launching a SelectFileDialog from an ARC Android app on ChromeOS (go/arc-file-picker) PROBLEM: SelectFileDialogExtension is shown as a modal to the default browser window [1] when the user specifies owning_window=NULL in SelectFileDialog::SelectFile, even though the method comment says "|owning_window| is the window the dialog is modal to, or NULL for a modeless dialog." [2] SOLUTION: Extend ExtensionDialog::Show with is_modal param and make it launch the dialog with CreateDialogWidget() instead of CreateBrowserModalDialogViews(). SelectFileDialogExtension still passes a non-null |parent_window| to ExtensionDialog::Show for obtaining screen_size, etc. [1] https://cs.chromium.org/chromium/src/chrome/browser/ui/views/select_file_dialog_extension.cc?q=base_window.%5C?&g=0&l=440 [2] https://cs.chromium.org/chromium/src/ui/shell_dialogs/select_file_dialog.h?q=owning_window&g=0&l=174 BUG=b:117912148 TEST=manually tested if non-modal dialog is shown Change-Id: Ie5ef18d7d613cefad544ee9e837f71b22a94bd4c Reviewed-on: https://chromium-review.googlesource.com/c/1304190 Commit-Queue: Satoshi Niwa <niwa@chromium.org> Reviewed-by:Peter Kasting <pkasting@chromium.org> Reviewed-by:
Sam McNally <sammc@chromium.org> Cr-Commit-Position: refs/heads/master@{#606349}
Showing
Please register or sign in to comment