fix: xdg portal version detection for file dialogs on linux (#46922)
* chore: use dbus thread for portal version detection Co-authored-by: deepak1556 <hop2deep@gmail.com> * Update shell/browser/ui/file_dialog_linux_portal.cc Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
0810fe54d4
commit
01994637e8
5 changed files with 172 additions and 86 deletions
|
@ -77,6 +77,16 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path);
|
|||
void ShowSaveDialog(const DialogSettings& settings,
|
||||
gin_helper::Promise<gin_helper::Dictionary> promise);
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
// Rewrite of SelectFileDialogLinuxPortal equivalent functions with primary
|
||||
// difference being that dbus_thread_linux::GetSharedSessionBus is not used
|
||||
// so that version detection can be initiated and compeleted on the dbus thread
|
||||
// Refs https://github.com/electron/electron/issues/46652
|
||||
void StartPortalAvailabilityTestInBackground();
|
||||
bool IsPortalAvailable();
|
||||
uint32_t GetPortalVersion();
|
||||
#endif
|
||||
|
||||
} // namespace file_dialog
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_UI_FILE_DIALOG_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue