#include "chrome/browser/ui/file_system_access/file_system_access_permission_dialog.h"
#include "base/feature_list.h"
#include "base/functional/callback_helpers.h"
#include "chrome/browser/file_system_access/chrome_file_system_access_permission_context.h"
#include "chrome/browser/file_system_access/file_system_access_features.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/file_system_access/file_system_access_ui_helpers.h"
#include "chrome/grit/generated_resources.h"
#include "components/permissions/permission_util.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/dialog_model.h"
#include "ui/base/models/dialog_model_field.h"
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
namespace {
AccessType;
FileRequestData;
RequestData;
RequestType;
HandleType;
int GetMessageText(const FileRequestData& file_request_data) { … }
int GetButtonLabel(const FileRequestData& file_request_data) { … }
std::u16string GetWindowTitle(const FileRequestData& file_request_data) { … }
std::unique_ptr<ui::DialogModel> CreateFileSystemAccessPermissionDialog(
content::WebContents* web_contents,
const RequestData& request,
base::OnceCallback<void(permissions::PermissionAction result)> callback) { … }
}
void ShowFileSystemAccessPermissionDialog(
const RequestData& request,
base::OnceCallback<void(permissions::PermissionAction result)> callback,
content::WebContents* web_contents) { … }
std::unique_ptr<ui::DialogModel>
CreateFileSystemAccessPermissionDialogForTesting(
const RequestData& request,
base::OnceCallback<void(permissions::PermissionAction result)> callback) { … }