From b2d3a6f3d3478dd76ece030c384b138f49dacf1f Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Fri, 16 May 2025 12:49:43 -0700 Subject: [PATCH] 6553142: Remove SelectFileDialogLinuxKde | https://chromium-review.googlesource.com/c/chromium/src/+/6553142 --- ...ing_dialog_features_to_shell_dialogs.patch | 85 ------------------- 1 file changed, 85 deletions(-) diff --git a/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch b/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch index 7f579fde8b..0b06a833dd 100644 --- a/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch +++ b/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch @@ -260,91 +260,6 @@ index 61683d0eddb04c494ca5e650e7d556b44968ec49..5492456a9138b250e97a5479838bb443 + bool allow_multiple_selection_ = false; }; - } // namespace ui -diff --git a/ui/shell_dialogs/select_file_dialog_linux_kde.cc b/ui/shell_dialogs/select_file_dialog_linux_kde.cc -index 9d45ec49a4fb5e12407b65b83c1ba0c13cd0dfd8..400cce91b020ecd5e48566f125515d2cfe3ea6af 100644 ---- a/ui/shell_dialogs/select_file_dialog_linux_kde.cc -+++ b/ui/shell_dialogs/select_file_dialog_linux_kde.cc -@@ -155,9 +155,20 @@ class SelectFileDialogLinuxKde : public SelectFileDialogLinux { - void OnSelectMultiFileDialogResponse( - gfx::AcceleratedWidget parent, - std::unique_ptr results); -+ -+ // Common function for OnSelectSingleFolderDialogResponse and -+ // OnSelectMultiFileDialogResponse. -+ void SelectMultiFileDialogHelper( -+ bool allow_folder, -+ gfx::AcceleratedWidget parent, -+ std::unique_ptr results); -+ - void OnSelectSingleFolderDialogResponse( - gfx::AcceleratedWidget parent, - std::unique_ptr results); -+ void OnSelectMultiFolderDialogResponse( -+ gfx::AcceleratedWidget parent, -+ std::unique_ptr results); - - // Should be either DESKTOP_ENVIRONMENT_KDE3, KDE4, KDE5, or KDE6. - base::nix::DesktopEnvironment desktop_; -@@ -468,6 +479,7 @@ void SelectFileDialogLinuxKde::CreateSelectFolderDialog( - int title_message_id = (type == SELECT_UPLOAD_FOLDER) - ? IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE - : IDS_SELECT_FOLDER_DIALOG_TITLE; -+ bool multiple_selection = allow_multiple_selection(); - pipe_task_runner_->PostTaskAndReplyWithResult( - FROM_HERE, - base::BindOnce( -@@ -475,10 +487,12 @@ void SelectFileDialogLinuxKde::CreateSelectFolderDialog( - KDialogParams( - "--getexistingdirectory", GetTitle(title, title_message_id), - default_path.empty() ? *last_opened_path() : default_path, parent, -- false, false)), -+ false, multiple_selection)), - base::BindOnce( -- &SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse, this, -- parent)); -+ multiple_selection -+ ? &SelectFileDialogLinuxKde::OnSelectMultiFolderDialogResponse -+ : &SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse, -+ this, parent)); - } - - void SelectFileDialogLinuxKde::CreateFileOpenDialog( -@@ -568,7 +582,8 @@ void SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse( - SelectSingleFileHelper(true, std::move(results)); - } - --void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse( -+void SelectFileDialogLinuxKde::SelectMultiFileDialogHelper( -+ bool allow_folder, - gfx::AcceleratedWidget parent, - std::unique_ptr results) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -586,7 +601,7 @@ void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse( - base::SplitStringPiece(results->output, "\n", base::KEEP_WHITESPACE, - base::SPLIT_WANT_NONEMPTY)) { - base::FilePath path(line); -- if (CallDirectoryExistsOnUIThread(path)) -+ if (!allow_folder && CallDirectoryExistsOnUIThread(path)) - continue; - filenames_fp.push_back(path); - } -@@ -598,4 +613,16 @@ void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse( - MultiFilesSelected(filenames_fp); - } - -+void SelectFileDialogLinuxKde::OnSelectMultiFolderDialogResponse( -+ gfx::AcceleratedWidget parent, -+ std::unique_ptr results) { -+ SelectMultiFileDialogHelper(true, parent, std::move(results)); -+} -+ -+void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse( -+ gfx::AcceleratedWidget parent, -+ std::unique_ptr results) { -+ SelectMultiFileDialogHelper(false, parent, std::move(results)); -+} -+ } // namespace ui diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db84e8dff6 100644